Redirecting the search engine friendly way.
Posted by David | Filed under Web Design Tips
If like me you’ve had to move pages on your website around, changing their names resulting in search engine listings leading to non existent pages then there are a couple of easy ways to help redirect your visitors, both human and spiders back to the right location.
The best way to do this is via a 301 Permanent Redirect, personally I do this using .htaccess as a means of connecting up visitors to pages on my previous site to the same relevant content on my new site. So how do you do it?
Well it’s pretty straight forward! First of all if you already have a htaccess file due to using WordPress or because of the way your hosting handles Page 404s then copy it to your computer and open it in NotePad. If you don’t then just open NotePad.
Say you used to have a page on your website called http://www.mywebsite.com/oldpage.html and you have now moved it to a new location, say http://www.mywebsite.com/newpage.html. To do this you would write the following in your htaccess file. (All on one line)
Redirect 301 /oldpage.html http://www.mywebsite.com/newpage.html
It’s really that simple! type Redirect 301 /theoldpage.html then type the new URL in full. Now save your htaccess again, or if it is a new htaccess save as .htaccess and upload to the root of your server. Ensure that it does not have a txt extension when it is uploaded and is simply named “.htaccess”. Make sure you don’t mess up anything else that was previously written in the .htaccess file it may be very important!
The Redirect 301 command is a permanent move, if you are only moving things for a short while you can use Redirect 302 which is written in exactly the same way.
Using this method is the most Search Engine and user friendly way of redirecting, although you should try and avoid doing it as much as you can. You MUST not use Javascript or Meta redirecting for a page, that is a big no-no. It is not search engine friendly, and they may not work in a users browser. You may also be penalized by search engines. With 301 redirecting you will not be penalized and your PageRank will be transferred to the new page.
Â
- Abbey Students Competition Abbey are currently running a great competition for university students; new and old alike. They are also offering a very appealing student bank account offer....
- Choosing the best Student Account (2009 – 2010) Home > Student Index > Choosing the right Student Account (2009 – 2010) As a follow up to our article last year, here is our...
- Merry Christmas! Merry Christmas to all my regular viewers and site visitors! I hope you have a great Christmas without too much hassle from revision or worry...
- Win a copy of Microsoft Windows 7 Ultimate David’s Blog are pleased to announce the first of (at least) two competitions that we will be rolling out in the run up to Christmas,...
- The Students Essential Guide to Living in Crookes (Part 1) Crookes is a suburb of Sheffield according to Wikipedia, and at 1 mile or less from the main university and in walking distance to the...
Tags: htaccess, htaccess redirect, Permanent Redirect, Redirect 301, SEO
