codehaven - php snippets - coding help
Generic filters
Exact matches only

Change domain name while retaining SEO

28th May 2020


SEO category

These are the guidelines for a proper 301 redirect when changing the domain name for your website.

When there is a need to change the domain name of a website, it should be with a proper 301 Redirect, search engines then know your website has “permanently” moved to another address domain.

Do not just rename all the links! This will mean every link on the internet goes nowhere!

Do not make a direct transfer to a new domain name without going through a redirect procedure, else you will lose all the domain authority your website has accumulated. Additionally, your new website will be considered a “copycat” of the website that was on the old domain name, and all the SEO domain authority that your website generates on the new domain name will still be adding to the old domain instead.

Keep your old domain name active for at least three to six months with the redirect active, and when search engines carry out there crawling over the old and new website then the domain authority will be transferred to the new domain name. Only then you can deactivate your domain name completely.

Process to retain your SEO

1. Create a copy of website in new hosting domain (do not release spiders or let google know yet, or you will get copycat problems)
Update all links with new domain name
Run website as normal

2. In old website add a redirecting htaccess file
This replaces the first part of url with new domain, but same page ending.

My analogy: –
Moving house is like moving house to new address or new domain name.

Tell Royal Mail (htaccess file) that if

Jeff Thompson
23 Clove Road

gets a letter, then send now to: –

Jeff Thompson
36 Abbingdon Road

This will mean the client will pay for hosting twice if they want to keep the seo.

After 3-6 months you can stop the redirect if its showing no redirects are being made through google dashboard for original website.

Was this code snippet helpful?