Shopping Cart

Your cart is empty
Comments
Blog
Home : Blog : Search Engine Optimization : 301 Redirects Search Engine Optimization

301 Redirects Search Engine Optimization

E-mail
User Rating: / 0
PoorBest 
Search Engine Optimization
Friday, 05 January 2007 01:19

Moving the pages of your website

It seems like that when we upgrade the site, we may move some of the pages, or even change the urls of the pages.

Search Engines and Missing Pages

Missing pages or moving the pages without telling the search engines can be very bad for your site rankings. Your traffic may decrease. Visitors can get pages with "Error 404 - File not found" that can be bad for overall popularity of your site.

Check the detailed explanation of 301 redirect in this 301 redirect article


 

Solution 1 – Creating a Custom Error Page

You can create a custom error page. The problem with this solution is that:

a) You will lose rankings on the next search engine update as the file will appear to be non-existent. It could be some time before the page in it's new location or with a new name reappears.

b) Your web site visitors may be frustrated by the fact that they then have to dig through your site to find the desired information.

Solution 2 - 301 Redirect

A 301 redirect is the most widely used efficient and search engine bots and visitor friendly solution for the websites that are hosted on servers running Apache (ask your host provider about it. It is the most common and safest solution when moving pages around your website.

301 redirect has to be use in your .htaccess file that lies in the root of your server.

What is a .htaccess file?

When a visitor/spider requests a web page via any means, your web server checks for a .htaccess file. The .htaccess file contains specific instructions for certain requests, including security, redirection issues and how to handle certain errors.

What is a 301 redirect?

The code "301" is interpreted as "moved permanently". After the code, the URL of the missing or renamed page of your website is written, followed by a space, then followed by the new location or file name of the page.

How do I use a 301 redirect?

First you have to create a .htaccess. You can just upload some text file for example mysite.txt to the root of your server (if you have a CMS system site you have to put the a .htaccess into the public_html folder). . If there is no .htaccess file there, you can create one with Notepad or a similar program. Use the ftp program for uploading. After that just rename the file to a .htaccess without the ending.txt because .htaccess does not have any extension like .txt . jpg . gif …………

It should look like this

 ALso be sure to check the detailed explanation of 301 redirect in this 301 redirect article

If there is already .htaccess on the server be careful not to remove and existing text. Just scroll down past all the existing code, leave a line space, then create the following 301 redirect code:

redirect 301 /old/old.htm http://www.you.com/new.htm

It's as easy as that. Save the file, upload it back into your website server and immediately test it by typing the old web address into url and it should be automatically redirected to the new page.

CAUTION: Do not add "http://www" to the first part of the statement - just put the path from the top level of your site to the page for example like this

/seo/redirects/redirect301.html. The whole code should look like this

redirect 301 (the instruction that the page has moved)

/old/old.htm (the original folder path and file name)

http://www.you.com/new.htm (new path and file name)

Redirecting websites with 301 redirect

You can also redirect not just single page of your website but also the entire sites, for example when you decide changing domain names of your site e.g.

redirect 301 / http://www.yourwebadress.com/

The first "/" indicates that everything from the top level of the site down should be redirected. As long as you are using the same paths and filenames, then this option is a very simple way to perform site redirection in the situation where you have only changed your domain name.

Canonical issues and solution: www vs. non-www

On many search engine forums a canonical issues with the website can be found. Each website has both the www and non-www versions of your pages listed in a search engine. This could be the cause of the duplicate content penalty by search engines. SO the following thing can be done. This example is where you wish to direct all non-www traffic to www:

 

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]


Ensure that all your links to folders always end in a trailing / if there is no filename after that link.

 

Caution: test, test and test again immediately after making changes. If there are problems you have to recheck the code in .htaccess file.

Search engine spiders & 301 redirects

The 301 redirect is the safest way to keep your rankings. When the search engine bots / spiders visit your site again they will obey the new code in .htaccess file and visit the redirected pages.

In the next update of the search engine index, the old url file name and path *should* be dropped and replaced with the new url address. Sometimes you may see both address old/new file names during the transition period, but that is not permanent. Do not freak out - this is normal process and may take a number of weeks before everything is back to normal; but the bottom line is, any change you make has risks. Search engines have their own rules and those can be changes anytime.

If you're changing domain names and using a 301 redirect, you have to leave the old domain name and files intact for a few weeks to give time search engines spiders to accept the changes. Also notify the people who are somehow correlated with your website. After the process is finished you can remove the old files and domains.

Also be sure to check the detailed explanation of 301 redirect in this 301 redirect article

 



Comments
Add New Search RSS
+/-
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
Please input the anti-spam code that you can read in the image.
miko  - great post |2008-08-04 17:55:01
great post man
ramesh  - good stuff |2008-08-04 18:08:26
thanks for posting this
Anonymous |2008-08-04 18:30:06
great stuff
Anonymous |2008-08-04 18:35:12
amazing