301 Redirect For SEO
301, htaccess, redirects, SEOThe “301″ refers to what is called the HTTP status code. This status code is what is returned to your browser (or search engine) when a page is requested.
The most familiar status code for the average person that uses the Internet is the “404″ page not found code. This happens when a page that you have requested is not found at the address that you visited.
A “301″ status code means that a page has permanently been moved to a new location. In contrast, the “302″ status code indicates that a page has only temporarily been moved.
Generally speaking, a 301 redirect is the most search engine friendly method for redirecting users and engines to a new location. This method should be used any time you have permanently moved a page, or site, to a new address.
This includes any time that you have changed the names of web pages in your site, moved your site to a new domain, or pointed an extra domain at an existing site.
There are a number of ways to accomplish the 301 redirect. Some are dependant on the server that you are hosted on, and some methods are pure choice.
Redirect in ColdFusion: <.cfheader statuscode="301" statustext="Moved permanently"> <.cfheader name="Location" value="http://www.new-url.com"> Redirect in PHP: <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new-url.com" ); ?> Redirect in ASP: <%@ Language=VBScript %> <% Response.Status="301 Moved Permanently" Response.AddHeader "Location", " http://www.new-url.com" > Redirect in ASP .NET: <script runat="server"> private void Page_Load(object sender, System.EventArgs e) { Response.Status = "301 Moved Permanently"; Response.AddHeader("Location","http://www.new-url.com"); } </script> .htaccess Redirect Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
If you are currently using a redirect in your site, you can use the following tool to verify that you are making proper use of the 301 redirect.
Related Posts




















October 16, 2006 @ 7:34 am
Can any one help me to set 301 redirect correctly.
I have a one domain and 2 subdomain on it.
http://www.mydomain.com
and
http://sub1.mydomain.com
http://sub2.mydomain.com
When I will set 301 redirect from non www version of website to www version of the website, will it create a following urls mentioned below ?
http://www.mydomain.com
http://www.sub1.mydomain.com
http://www.sub2.mydomain.com
If it comes, how to correct ?
I also want to 301 redirect all the pages under
http://www.mydomain.com/sub1/ -> http://sub1.mydomain.com/
and
http://www.mydomain.com/sub2/ -> http://sub2.mydomain.com/
Can you help me to set all these right.
[Reply]
October 22, 2006 @ 12:21 pm
Please take a look at the Module mod_rewrite
URL Rewriting Engine and the URL Rewriting Guide for more information on mod_rewrite and its uses. I can also be hired to make these changes for you… I can’t give everything away for free ;).
[Reply]
November 29, 2006 @ 5:23 am
Is there any special techniques that can be used to optimize a wordpress blog on my server for SEO. One issue I see is no way to change the title tags on each page, where it seems to take the blog name for the home page.
I have several hundred 600+ inbound links.
I have pinged Technorati manually and used pingoat as well as pingomatic every time I add a new blog.
There is plenty of content, about 30 articles.
What else can I do? What else should I do to optimize my blog?
[Reply]
November 29, 2006 @ 5:54 pm
Yes! Please take a look at these posts here and here.
However - the best thing you could possibly do to promote your blog is POST LOTS OF CONTENT. I cannot stress this enough. Content is king when it comes to blogs.
[Reply]
December 13, 2006 @ 11:57 pm
Is there anyway to redirect my myspace page to a different homepage?
[Reply]
January 11, 2007 @ 8:23 pm
No.. There really is no way to do this. Even if you found a way, you would run the risk of loosing your account.
[Reply]
October 29, 2008 @ 7:35 pm
[...] I have also written a post on the use of 301 Redirects for SEO [...]
November 2, 2008 @ 9:45 am
[...] in part from Zach Graeves blog, there’s also a good post on 301 redirects for SEO covering code-level redirects in different web [...]
November 2, 2008 @ 7:58 pm
The ‘Redirect Checker’ was helpful. We moved a forum from http://newyorkforum.us to http://411newyork.org/forum/ so our custom google search has to only work one site. In the long run, all we will have it one domian to maintain which will cit cost.
Question. How should a robot.txt file be configured on the old site? Should thee be one at all?
[Reply]
November 3, 2008 @ 6:25 am
If you have properly set up a 301 redirect from the old location of the forum to the new location, then a robots.txt file is not needed at the old address. This is because the htaccess file will be the first thing hit and it will instruct that all visits/spiders move to the new location before seeing anything else. So you will only need a robots.txt file in the new location.
[Reply]