Wednesday, June 20, 2012

Moving a Blogger blogspot blog to a new domain

We have recently tried to move a Blogger blog not to Wordpress but to a new domain and done so by creating a new blog. I just realized there is a better option..

The following technique was designed for a Blogger to Wordpress move, but it works just fine with a Blogger to new domain move. To keep your search engine ranking AND send off your human visitors to the new domain, all you have to do is employ the method described step by step by labnol (link below; he even has a video tutorial). Essentially, this means entering the following code as an “old style” or “classic” template (Revert to Classic Template first) in a blog under your old domain:

20120620-000-screencapThe code can be seen above as a screencap with all the substitutions that need to be done underlined and below in plaintext.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ""><html xmlns="" xml:lang="en" lang="en" dir="<$BlogLanguageDirection$>"><head> <title>  <$BlogPageTitle$> </title> <script type="text/javascript"> <MainorArchivePage>window.location.href=""</MainOrArchivePage>  <Blogger><ItemPage>window.location.href="<$BlogItemPermalinkURL$>"</ItemPage></Blogger> </script> <MainPage><link rel="canonical" href="" /></MainPage>  <Blogger><ItemPage><link rel="canonical" href="<$BlogItemPermalinkURL$>" /></ItemPage></Blogger></head><body> <div style="border: #ccc 1px solid; background: #eee; padding: 20px; margin: 80px;">  <p>This page has moved to a new address.</p>   <h1>     <MainOrArchivePage><a href=""><$BlogTitle$></a></MainOrArchivePage>     <Blogger>       <ItemPage><a href="<$BlogItemPermalinkURL$>"><$BlogItemTitle$></a></ItemPage>     </Blogger>    </h1>  </div>  </body>  </html>

There is another version of this template (or is it the same? I dont know) appearing on doitwithwp. Here you have 6 substitutions to make.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en" lang="en" dir="<$BlogLanguageDirection$>">

<script type="text/javascript">
window.location.href='< $BlogItemPermalinkURL$>'

<mainpage><link rel="canonical" href="" /></mainpage>
<link rel="canonical" href="<$BlogItemPermalinkURL$>" />

<div style="border:#ccc 1px solid; background:#eee; padding:20px; margin:80px;">
<p>This page has moved to a new address.</p>

<mainorarchivepage><a href="">< $BlogTitle$></a></mainorarchivepage>
<a href="<$BlogItemPermalinkURL$>">< $BlogItemTitle$></a>

It is obviously much easier to let labnol’s script do the substitutions for you than to do it yourself or in a text editor with Search and Replace (Ctrl+H most of the time). We are providing the code just in case their script stops functioning.

So now with this “missing link” in place, what you can do is follow some simpler and quicker steps.

  1. Create a new blog using the template above pointing to your new domain.
  2. Remove the old domain from your old blog and, if staying with Blogger / Blogspot, point your new domain to your old blog (as a “Custom domain” as Blogger calls it).
  3. Go to your new blog (with the tricky template from step 1) and add your old domain as a custom domain.
  4. Create aliases in the new blogger for the /?q=oldURL for the top ranking pages.
  5. Since you probably want to give up your old domain or use it for other purposes, you might want to change in-linking to the new domain.

You might consider using “relative” in-linking (i.e., use /inlink.html as opposed to The problem with relative links is that they might not work for someone accessing the article via a full feed. Then again, if you don’t have full feeds, you don’t need to worry about that. As an added bonus, if someone ever steals your content, they will have a bunch of dead links to worry about as well. On the other hand, if you wish, much like Milton Friedman, for your ideas to be “stolen” and disseminated among an ever-expanding group of people, the “theft-protection” may end up being a hindrance.

The last step can be done at leisure, while the first 3 must be done quickly – using several open browser windows, perhaps – to minimize downtime. In the case of heavily trafficked blogs you might want to do it at the time when you have the least visitors on your blog.

The best way to change in-linking to the new domain is probably to download a backup of your old blog, open the .xml file in a text editor then perform the substitution using Search & Replace, as explained starting with 3) in Join the BlogIdol Movimiento. Re-uploading this backup to your blog might be tricky, as you can end up with duplicate articles; you will then have to delete one of each, but it might be hard to determine which one is the good one. This is what I intend to test and determine next.

Sources / More info: labnol, doitwithwp


  1. Deci, încercând să accesez adresa veche ( obținem ce se vede mai gios:

    Not FoundThe requested URL / was not found on this server.Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

  2. ..for the reasons explained in the very latest article on this blog -


Thank you for commenting and rest assured that any and all comments are welcome, whether positive or negative, constructive or distructive. Unfortunately, if you comment in this view I might not know about - please use the regular (Desktop) view.
I am using Disqus for commenting, but Blogger is not showing it so your comments may end up not being displayed - tell Google about it!