Re-directing using .htaccess.
So you’ve decided to create a new web site, you have used a contant management system (CMS) such as Word Press, you have completed your web design, you’re satisfied with the results, and have launched your new web design onto your Linux web host.
Great, all done? Well not quite. Something you may not have considered is your existing search engine rankings for the previous incarnation of your web site.
If you have exactly the same file names for your pages, this is not an issue, but the chances are, especially if you are using a CMS, the file names will have changed. In this case, if someone clicks on your existing Google listing they will at best get a copy of your old out of date web page and at worst, get a 401 page error. Further more, Google Spiders may remove your listing from your their database all together.
So, what is the solution?
The smoothest way to redirect your visitors is to use an .htaccess redirect. This has no delay since before a page is served to the browser the server checks first for an .htaccess file, if it sees this the old page never loads, instead visitors are sent directly to the new page. It also tells search engine spiders of a permanent redirect.
If you’re using a Linux Server, an answer is to edit the .htaccess file.
Using FTP, download your existing .htaccess file from the root directory of your server and edit it with notepad.
Note, generally speaking your ftp software will not show your .htaccess file as it is a hidden file, you will need to change the settings to show hidden files. The free FTP program FireZilla is excellent for this purpose.
Once you have your .htaccess file open in Notepad, you can add the following line of code for each of your old pages.
Redirect 301 /oldpagename.htm http://www.domain.com/newpagename
Domain being your domain name or web address. For example, my about us page changed from aboutus.htm to a wordpress page about-us so I used the code:
Redirect 301 /aboutus.htm http://www.a38.com/about-us
Once you have done this for each of your old pages, save the file and transfer it back to your root directory on your server. Job done. Try visiting one of your old page urls and it should transfer you seamlessly to your new page.
To Move an entire site
This will catch any traffic on your old site and redirect it to your index page on your new server. If you want to redirect each page to its new spot, this isn’t the one for you.
Redirect 301 / http://www.newsite.com/
Please note, this is for Linux Servers only, I will follow this article up with a version for Windows servers soon.
For those of you who want the ins and outs straight from the horses mouth, check the Apache Tutorial on .htaccess files for more detailed info.
I hope you found this article helpful, please feel free to comment or ask questions.
A38.com is a web design, search engine optimisation (SEO) and web promotion business based in Plymouth, Devon. We predominantly cover Plymouth, Plympton, Plymstock, Tavistock, Yelverton, Saltash, Ivybridge, Totnes, Torquay, Torbay, Exeter, Newton Abbot, Devon and Cornwall.
We are of course happy to help anyone wherever you are in the UK and we have many happy clients all over Britain. We believe search engine optimisation (SEO) and web promotion should begin within the local area that a business covers. Google, Bing and Yahoo are all moving toward regional and local searches as this is predominantly what their users want.
A38.com are a market leader in local search engine optimisation SEO and website promotion. For more information on our SEO Search Engine Optimisation and web promotion services call us now on 01822-85 94 95.

