Skip to content

Domain name migration without losing SEO

Posted in Tutorials, and Web-ish

How did that even come up?

I originally started writing another post last week but in the meantime I did a domain name migration. What is a domain name migration you will ask? It is the act of migrating content from a domain to another domain. Not host, domain. If this was about host migration there would be no need for a post as the changes would be straightforward. People may give you a different or more precise description but it is basically what I did. And also what it sounds like. I like to name things so that when they are described or revealed they turn out to be pretty much what you expect. It’s like coding. If I have a piece of code with a method boolean validatePassword(string username, string password) when looking at the code you pretty much expect to see some user retrieval and maybe encoded password validation. You definitely do not expect a session to be started or anything funny like that. Enough with this, let’s get back onto today’s topic. Domain name migration.

Why would I do that?

I decided to separate my blog from my main domain iamnguele.com a couple of weeks ago as I picked a new pseudo that you may have noticed by now: Coding Nagger. Why that name and why move only the blog? I thought I should pick a different and more playful pseudo than IamNguele. IamNguele was more of a statement, some “Hey I’m here” kinda thing. Also, my english was not great and nguele.com was taken. On top of that, iamnguele gets me on top of the SEO rankings on my name. On top of that, I gain rankings for the search term coding nagger as you can see below.

coding nagger seo
More SEO power to me, even though mixed for now

Now, after five years living in London I like to think I somewhat improved my english speaking and writing skills. Also I picked a name that would be more fitting. The Coding part is pretty self-explanatory, and Nagger because I can try to push you something that I believe is the right thing whether you like it or not. Just to precise the context I’m talking about code reviews, solution analysis/design. So here we are, Coding Nagger and I still have not mentioned anything about domain name migration but you get the context at least.

say nagger
You understood that reference or you will

The challenges involved

Changing domain name in itself is relatively easy. Most hosting providers allow you to point and click your way through it even if you go for tech saavy stuff like Amazon Web Services. However, there are a few things that you need to take into consideration before you get started. If your website or blog is part of your personal brand and ranks well either you are a probably a pioneer in your field, no matter how niche it can be. If it is the case, congrats you may not need SEO as much as others such as myself.

What is SEO? I hear you ask. SEO stands for Search Engine Optimisation. The rules seem to change pretty constantly and vary based on which search engine you use. Basically, put out quality content, stay on focus of the topic you want your article/blog/website to rank up and voila. The problem with domain name migration is that if you are not careful, it will take a while before your pages rank back up. It will happen because your search engine will consider that your “renamed” site is a new site. Therefore whatever counter or algorithm search engines use to rank sites will see your website as having a score of 0 out of 100 instead of let’s say 42 figuratively speaking.

Do your pages have a decent SEO rating? Do you intend to keep things like this? If the answer to either of this questions is no, feel free to skip the end of the post and rejoice for the now more useful introduction I gave you.

Eventually, you need to consider whether your existing website requires a SSL certificate and whether the links you find through your favorite search engine use the http or https protocol. If your website has secure links the they are likely to rank higher and be prioritised over their non-secure version by your browser or search enine.

Once you figured your constraints we (mostly you) can get to work.

SEO safe domain name migration in 3 easy steps!

This probably should have been the title of this post, really clickbait worthy. The gist of what needs to happen is redirecting your existing website links towards the new domain name. Let’s get down to business.

domain name migration shang
General Li Shang definitely knows what’s up

Step 1: Point your new domain to your content

If you do not have your new domain name, the obvious first step is to buy. Just the domain name, nothing more, nothing less, yet. Once you have the domain name, get it to point to the location where your existing website is hosted. Some hosting providers will allow you to do so with a couple clicks. If you manage your domain names separately from your hosting you will need to CNAME entries of your new domain yourself to point at the IP address where you host your website.

After a few minutes, you can try to access your website using your new domain name. You should be able to navigate it with the right links and the same structure you have for your existing domain.

Step 2: Keep the lock on if lock there was

You may remember that I mentioned something about http and https links visible through a search engine result page. If your existing website has its pages indexed with the https protocol prefix you have one last thing to deal with before setting up the redirect. You need to setup a SSL certificate so that browsers allow people to access your new site. Believe me, you do not want to just reassign the certificate to the new domain. I tried and had a micro-heart attack when I realised 5 minutes later that the links to my existing blog would not even open redirect or not. This is because if your website tells a browser it has a secure link but have no certificate it will simply be blocked. If it has an invalid certificate it will prompt users that your website is unsafe to access or stole another site’s certificate. Just buy a new certificate and assign it to your new domain. Keep the existing stuff where it is.

Step 3: Do the actual redirect

Here we do the easy bit. Your hosting provider should give you access to at least a FTP containing a bunch of folders and one of these contains your website. From there, you need to create a new folder sitting next to your website folder that will contain the .htaccess file where you shall write the permanent redirection configuration. Once that folder is created you will have to upload a .htaccess file with these contents:

Obviously you may replace www.codingnagger.com with your domain name unless you want to send me more traffic. I would be more than fine with that. Also, if you do not have nor require a SSL certificate on your existing and new domain, replace https with http.

Closing

Here I chose not to detail the specific of each step as there is multiple ways to achieve this for all providers. Also, for most hosting provider the process is trivial in itself and if you manage your domain name yourself you definitely know your way around your provider dashboard. The one thing you may need is a bit of experience, of guidance. A flow showing in which order you should proceed to avoid losing your SEO ranking. I mean, personally it did not go so bad. My blog went from top hit when googling myself to bottom of the first page with a title change on top of the domain change. Just look:

first page coding nagger
Still first page

Note that I had a look at some of my most popular posts, the one that have the best SEO rankings. Some still appear under the blog.iamnguele.com domain. Try to google nsattributedstring color image and see what comes up maybe not first everywhere but at least second.

nsattributed string coding nagger bing
First 2 results on Bing
nsattributed string coding nagger google
Second on Google, not too shabby

This is why SEO matters. And I will update the post in a few days/weeks to see if it still pops up on top after Google’s indexer sees it as a codingnagger.com entry. It has been there for a couple years now and I doubt it changes. Unless I screwed up completely and give you an excellent reason to disregard this whole post.

Thank you for reading and hopefully this will help you doing some domain name migration without losing your content rankings. Till next time.

Be First to Comment

    Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    %d bloggers like this: