Home Daily Marketing Tips About Me Work With Me

Marketing & Design Blog

Internet Marketing, SEO, Blogging, Social Media, Lead Generation and Analytics

301 Redirect For SEO

, , ,

The “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.

Search Engine Friendly Redirect Checker

Enter the URL to check:

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

12 Comments »

  1. 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.

    Comment by JayeshLodha — October 16, 2006 @ 7:34 am

  2. 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 ;) .

    Comment by zacheos — October 22, 2006 @ 12:21 pm

  3. 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?

    Comment by Jaxson — November 29, 2006 @ 5:23 am

  4. 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.

    Comment by zacheos — November 29, 2006 @ 5:54 pm

  5. Is there anyway to redirect my myspace page to a different homepage?

    Comment by Dan — December 13, 2006 @ 11:57 pm

  6. No.. There really is no way to do this. Even if you found a way, you would run the risk of loosing your account.

    Comment by zach — January 11, 2007 @ 8:23 pm

  7. [...] I have also written a post on the use of 301 Redirects for SEO [...]

    Pingback by htaccess Cheatsheet — October 29, 2008 @ 7:35 pm

  8. [...] in part from Zach Graeves blog, there’s also a good post on 301 redirects for SEO covering code-level redirects in different web [...]

    Pingback by Pipe Ten Web Hosting Resource » Blog Archive » .htaccess cheat sheet — November 2, 2008 @ 9:45 am

  9. 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?

    Comment by 411 New York — November 2, 2008 @ 7:58 pm

  10. 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.

    Comment by zacheos — November 3, 2008 @ 6:25 am

  11. You were right. :) Thanks again for your wisdom.

    Curently, we are working to correct an error that we are getting on alias domains. A guess is the .htaccess file in the root is the culprit and may have to add customize .htaccess file in folders that needs redirecting then remove the one in root.

    Any opinions?

    411 New York’s last blog post… LAWYER ACCUSED OF FORGING JUDGE’S SIGNATURE IN REAL-ESTATE SCAM

    Comment by 411 New York — June 3, 2009 @ 11:34 am

  12. I am not sure I understand your question actually. Can you explain more?

    Comment by zacheos — June 3, 2009 @ 12:18 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

logo design brand development

We have simplified the typical logo ordering process, put you in direct contact with the artist, made getting additional branding products and websites easy, and rounded it all off with high quality printing services at fantastic rates... Learn more

website design development

We have made getting a completely dynamic website built on the WordPress content management system with a theme of your choice easy. We integrate your logo into the site design and offer great add-ons at amazing prices - giving you a range of choices on design and layout... Learn more

search engine optimization

We have expert SEO consultants ready to tackle any aspect of your search engine marketing and optimization needs. We take pride in the ability to custom build an Internet marketing campaign that is perfectly suited to your needs.... Read more


© Copyright 2003-2010 Zach Graeve and Expert Online Services, LLC. All Rights Reserved.
 Subscribe, RSS, Comments RSS, XML Sitemap, Privacy Policy