Ever decide to pickup and move your website to a new domain?
What about buying a similar domain and needing to redirect it to your current website?
I’ve personally started two startups before using different TLDs than the .com. Both names I wanted were registered and I didn’t want to fork out thousands of my startup budget until I at least had proven my minimum viable product (MVP) as successful.
Therefore once I was able to afford the .com, it was essential to pass my search engine rankings!
How To Redirect Preserving Search Engine Rankings
If you have already developed your website and are wanting to move everything to a new domain, you need to do a couple of things:
- Move your content
- Setup 301 redirects from the old website to new
Move Your Content
Moving your content shouldn’t be to hard. If you’re using WordPress you can easily export all of your post data and re-import it into your new website. You could also simply copy over the existing database as is and edit your wp options table to reflect the new domain.
To keep things simple, I also recommend retaining a similar URL structure on the new domain.
For example, if you were using https://old-domain.com/post-name-goes-here/ it would be easiest to keep https://new-domain.com/post-name-goes-here/.
While it’s still possible to change the URL structure, this will ensure you don’t run into any errors.
Setup 301 Redirects
A 301 redirect tells the search engines the content has been moved permanently allowing for your search engine rankings to pass through to the new domain. This also carries over your existing backlinks.
You can setup a 301 redirect by creating or modifying the .htaccess file in your root public_html directory. You would want to format it like this:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^old-domain.com [NC,OR] RewriteCond %{HTTP_HOST} ^www.old-domain.com [NC] RewriteRule ^(.*)$ http://new-domain.com/$1 [L,R=301,NC]
This would take into consideration that you have preserved the link structure to the old content.
How To Create And Manage Redirects In cPanel
The easiest way to do all of this is inside of cPanel. This way, you don’t have to worry about modifying your .htaccess file, you can let cPanel handle it all.
I’ve recorded a brief video tutorial to show you how to do this:
As you can see, cPanel makes this so much easier than manually going in and editing your .htaccess file. I personally like their “search” feature so you can quickly modify existing redirects.
If you have any questions or need our team to take a look to ensure you’re redirecting your website correctly, feel free to let us know!
Ryan Gray is the founder and CEO of NameHero, one of the fastest growing independent web hosts in the United States. Ryan has been working online since 1998 and has over two-decades experience in Internet Entrepreneurship.
Leave a Reply