Moving a Site from One Domain to Another Just Got a Little Easier
Let’s say you have a website (or a blog) on www.my-old-site.com that you now want to move to another web domain which at www.my-new-site.com.
The usual method is that you copy all your web pages, images and other files from the old site and place them into your new site. You then have to setup 301 redirects on the old domain so that human visitors and search engine bots automatically land on your new site when they try reaching a page on your old site (which no longer exists).
The problem with 301 Redirects
The method described above works most of the time but there can be situations when you don’t have access to the web server that is hosting your old website and therefore you cannot implement 301 redirects.
For instance, if you want to migrate a site from Blogger to a new domain under WordPress, you simply cannot use server-side 301 redirects as you don’t have access to the web server that is hosting the Blogger blog. What do you do then?
301 Redirects and the Canonical Tag
There’s however a simple solution now that may not be as effective as a 301 permanent redirect but will at least help you inform search engines about the new location of your old pages without you having to change anything on the server side.
All you have to do is edit the HTML source of your existing web pages on the older domain and include a rel=canonical link that points to their new location. Let me explain.
For instance, if your old site has a page on oranges, you can edit the <head>
section of that file to include the following information:
<link rel="canonical" href="http://my-new-site.com/oranges.html"/>
The next time Google downloads that oranges.html page from your old domain, it will take into consideration your suggestion that is only a duplicate page and it may therefore prioritize the new site in search results.
The Canonical tag was primarily created to help website publishers specify pages on their site that may be duplicate of each other and initially it didn’t work across domains but with this new change, the rel=canonical attribute can also be used to specify page URLs that may be on different domains.
I have updated the previously released Blogger to WordPress migration tool so that it takes advantage of the canonical tag.
In addition to Google, Bing and Yahoo! too understand the canonical tag. You can learn a bit more about the Rel=“Canonical” attribute from the following video:
Amit Agarwal
Google Developer Expert, Google Cloud Champion
Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.
Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory