Introduction

Migrating a website to a new domain can hurt your rankings when it is not performed properly. This article provides a do-it-yourself SEO procedure to achieve this safely.

Preparation

Before performing the migration from your oldsite.com to your newsite.com:

• Register both oldsite.com and newsite.com in Google Search Console.
• If you have a set a disavow file for oldsite.com, set the same file for newsite.com.
• If oldsite.com is under a manual penalty, wait until it is revoked before proceding with the migration itself, else that manual penalty could be passed by Google to newsite.com too.
• Create a 'page not found' with user friendly content returning a 404 error code on both the oldsite.com and newsite.com.
• Don't create a soft 404 page (i.e., a 'page not found' returning a 200 http status code) on newsite.com, it makes it harder for Google to drop deleted pages from its index.
• Don't redirect deleted pages to the home page of newsite.com, it provides no PageRank benefit.
• Create an inventory of all content to migrate from oldsite.com.
• Copy images, CSS, Javascript and other resources from oldsite.com to newsite.com.
• Test all migrated forms, interfaces and emails on newsite.com before performing the migration.
• Check for broken links on both the old and new website.
• Implement new tracking codes on the new website (Google Analtyics, etc.)
• Try to use relative URLs (/oldpath/mypage.html) rather than absolute URLs (http://oldsite.com/oldpath/mypage.html) on both the old and the new websites. In other words, make your site portable, this reduces the risk of errors during the migration.

If you copy content from oldsite.com to newsite.com, this may temporarily result in duplicate content. Don't worry, Google does not penalize websites for that. However, both content will compete for ranking until is it removed or set to NOINDEX on oldsite.com.

If newsite.com Was Previously Owned

• You can find about its content history with Wayback Machine.
• Check its backlink profile and add spammy websites to the disavow file.
• If newsite.com is under a manual action, solve it as soon as possible and file a reconsideration request explaining your have taken over the domain name.

REM: if newsite.com is under an algorithmic penalty or a manual action, it may have been demoted or removed from search results. After disavowing its spammy backlinks and removing spammy content, you will have to wait for a Panda and/or a Penguin refresh for rankings to return. It can take several month and up to a year, although Google is working on accelerating this process.

For Each Page To Migrate

• Simple copy - Copy the content from oldsite.com/oldpath/mypage.html to newsite.com/newpath/mypage.html.
• Copy with rewrite - Copy the content from oldsite.com/oldpath/mypage.html to newsite.com/newpath/mynewpage.html and mark the new page as NOINDEX while you rewrite some of its content. Remove the NOINDEX when the new page is production ready, else the Panda algorithm may penalize you.
• New content - Create new content on newsite.com before pages from oldsite.com will point to it. Mark them as NOINDEX while they are work in progress.

Find Links In HMTL Tags

The list of HTML tags containing URLs is the following:

• applet area audio base button blockquote body command del div embed form frame head href html iframe img input ins link meta object q script source video

One needs to make sure all these links point to newsite.com if they were pointing to oldsite.com. The list of HTML tag attributes containing those links is:

• action= archive= background= classid= cite= codebase= data= formaction= href= icon= longdesc= manifest= poster= profile= src= style= usemap=

It is easier to search for those attributes in oldsite.com than searching for HTML tags.