Press "Enter" to skip to content

Permanently Moving Domain

As many of you will know, I’ve been involved with the Manchester Film Co-op for a few years now, after taking over the running of the group in the summer of 2012. Two of the things I inherited from the old organisers were the website (which I converted from Blogger to WordPress) and the domain name manchesterfilm.coop. This particular top-level domain – like .gov and .edu TLDs – isn’t available to anyone and everyone. To obtain a .coop domain, you must first prove your eligibility as a co-operatively run organisation.

Whilst this is all well and good, the smaller number of domains mean that the yearly renewal charges from the registrar come to almost £100 once VAT is included. As a small group with little income we’re not easily able to afford this charge each year. After the previous renewal in April, I proposed to the group we move to a new and cheaper to run domain name. As the new .uk domains were launched on the 10th of June, I took the opportunity to register one. Manchesterfilmcoop.uk was chosen as the new address, as it adds just two additional characters to the existing address, and costs just under a tenner a year to run.

However this prompted a dilemma. The old .coop domain had been registered in 2008 and the search engine rankings for this were excellent. For example a search for “manchester film” lists our group sixth in the list, above the likes of the AMC and Vue. I didn’t want to run the risk of losing these rankings.

Performing The Move…

The first step is to get the new site up and running at the new address. I host most of my sites on a Bytemark VPS server running Debian Wheezy (I also use their DNS platform) so I decided to get a copy of the site up and running on a completely new Apache virtualhost, the reasons for which will become clear later on. I pointed the A records to the new site and we were up and running.

The next step was to get all traffic destined for the old domain redirecting to the new one. As the content on both sites was identical, I wanted to implement a wildcard redirect, so that visitors to any page on the old domain would be redirected to the same page on the new one. I decided to implement a redirection in the ‘.htaccess‘ file for the manchesterfilm.coop domain, which would take all traffic (whether for the main domain or the ‘www’ subdomain) and redirect it appropriately:

<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks -MultiViews
RewriteCond %{HTTP_HOST} ^(www\.)?manchesterfilm.coop$ [NC]
RewriteCond %{SERVER_PORT} =80
RewriteRule ^(.*)$ http://www.manchesterfilmcoop.uk/$1 [R=301,L]
</IfModule>

You’ll notice I’m using a 301 redirect in the final line, this being the Apache code for a permanent redirect, as opposed to a temporary 302 redirect. If you’ve been running a WordPress installation (or some other CMS) you’ll want to ensure you comment out the previous Apache rewrite rules, as they will probably cause you issues, and they’re obviously no longer required as visitors will no longer hit any of your WordPress permalinks.

If you’ve done everything right you’ll now find all links, even to specific pages, will now force visitors onto the new site. The 301 code should also ensure that search engines eventually update their listings as their web crawlers spider it. You can check this has been successful by running a manual HTTP GET via the Telnet protocol (the commands you’ll need to type are in bold):

jonathan@jonathan ~ $ telnet manchesterfilm.coop 80
Trying 213.138.101.210...
Connected to manchesterfilm.coop.
Escape character is '^]'.
GET / HTTP/1.1
Host: manchesterfilm.coop

 

HTTP/1.1 301 Moved Permanently
Date: Thu, 24 Jul 2014 19:25:49 GMT
Server: Apache/2.2.22 (Debian)
Location: http://www.manchesterfilmcoop.uk/
Vary: Accept-Encoding
Content-Length: 326
Content-Type: text/html; charset=iso-8859-1

So this leaves one final question, how to ensure that Google’s search engine results update, and fast. This is where Google Webmaster Tools comes in. If you have a Google account you can sign-in to the webmaster tools site and add both domain names. To add a domain you’ll need to validate ownership of this, which requires you to upload a HTML file provided to you by Google. (In my case I’d already implemented the 301 redirect, so to validate ownership of the old domain I had to temporarily disable this.)

Once you’re signed in you can use the settings screen to request a Change of Address. Once both domains are validated, you’ll have the option to select the new domain from a drop down list and confirm the address change. You’ll then see confirmation:

webmaster-move

This should complete the process of permanently moving the website to a new domain. Just four days later, Google has completed the change of address and this is now the final result, shown in exactly the same place in the rankings:

search

4 Comments

  1. I thinks thats your post completly and I can try moving my domain permanently right now. Thankyou for everything, your post so useful for me ….nice to meet your site 🙂

  2. You can certainly see your enthusiasm within the article you write.
    The world hopes for more passionate writers such as you who
    are not afraid to mention how they believe. All the time follow your heart.

  3. Hmm it looks like your website ate my first clmment (it wwas super long)
    so I guess I’ll just sum it up what I had written and say, I’m thoroughly
    enjoying your blog. I as wedll am an aspiring blog blogger but I’m still
    new to everything. Do you have any suggestions for rookie blog writers?
    I’d certainly appreciate it.

  4. nice tutorial, thanks jonathandavis.me.uk

Leave a Reply

Your email address will not be published. Required fields are marked *

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