Share via


Redirects, 301, 302 and IIS SEO Toolkit

In the URL Rewrite forum somebody posted the question "are redirects bad for search engine optimization?". The answer is: not necessarily, Redirects are an important tool for Web sites and if used in the right context they actually are a required tool. But first a bit of background.

What is a Redirect?

A redirect in simple terms is a way for the server to indicate to a client (typically a browser) that a resource has moved and they do this by the use of an HTTP status code and a HTTP location header. There are different types of redirects but the most common ones used are:

  • 301 - Moved Permanently. This type of redirect signals that the resource has permanently moved and that any further attempts to access it should be directed to the location specified in the header
  • 302 - Redirect or Found. This type of redirect signals that the resource is temporarily located in a different location, but any further attempts to access the resource should still go to the same original location.

Below is an example on the response sent from the server when requesting https://www.microsoft.com/SQL/

HTTP/1.1 302 Found
Connection: Keep-Alive
Content-Length: 161
Content-Type: text/html; charset=utf-8
Date: Wed, 10 Jun 2009 17:04:09 GMT
Location: /sqlserver/2008/en/us/default.aspx
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET

 

So what do redirects mean for SEO?

One of the most important factors in SEO is the concept called organic linking, in simple words it means that your page gets extra points for every link that external Web sites have linking to your page. So now imagine the Search Engine Bot is crawling an external Web site and finds a link pointing to your page (example.com/some-page) and when it tries to visit your page it runs into a redirect to another location (say example.com/somepage). Now the Search Engine has to decide if it should add the original "some-page" into its index as well as if it should "add the extra points" to the new location or to the original location, or if it should just ignore it entirely. Well the answer is not that simple, but a simplification of it could be:

  • if you return a 301 (Permanent Redirect) you are telling the search engine that the resource moved to a new location permanently so that all further traffic should be directed to that location. This clearly means that the search engine should ignore the original location (some-page) and index the new location (somepage), and that it should add all the "extra points" to it, as well as any further references to the original location should now be "treated" as if it was the new one.
  • if you return a 302 (Temporary Redirect) the answer can depend on search engines, but its likely to decide to index the original location and ignore the new location at all (unless directly linked in other places) since its only temporary and it could at any given point stop redirecting and start serving the content from the original location. This of course makes it very ambiguous on how to deal with the "extra points" and likely will be added to the original location and not the new destination.

 

Enter IIS SEO Toolkit

IIS Search Optimization Toolkit has a couple of rules that look for different patterns related to Redirects. The Beta version includes the following:

  1. The redirection did not include a location header. Believe it or not there are a couple of applications out there that does not generate a location header which completely breaks the model of redirection. So if your application is one of them, it will let you know.
  2. The redirection response results in another redirection. In this case it detected that your page (A) is linking to another page (B) which caused a redirection to another page (C) which resulted in another redirection to yet another page (D). In this case it is trying to let you know that the number of redirects could significantly impact the SEO "bonus points" since the organic linking could be all broken by this jumping around and that you should consider just linking from (A) to (D) or whatever actual end page is supposed to be the final destination.
  3. The page contains unnecessary redirects. In this case it detected that your page (A) is linking to another page (B) in your Web site that resulted in a redirect to another page (C) within your Web site. Note that this is an informational rule, since there are valid scenarios where you would want this behavior, such as when tracking page impressions, or login pages, etc. but in many cases you do not need them since we detect that you own the three pages we are suggesting to look and see if it wouldn't be better to just change the markup in (A) to point directly to (C) and avoid the (B) redirection entirely.
  4. The page uses a refresh definition instead of using redirection. Finally related to redirection, IIS SEO will flag when it detects that the use of the refresh meta-tag is being used as a mean for causing a redirection. This is a practice that is not recommended since the use of this tag does not include any semantics for search engines on how to process the content and in many cases is actually consider to be a tactic to confuse search engines, but I won't go there.

So how does it look like? In the image below I ran Site Analysis against a Web site and it found a few of these violations (2 and 3).

IISSEORedirect1

Notice that when you double click the violations it will tell you the details as well as give you direct access to the related URL's so that you can look at the content and all the relevant information about them to make the decision. From that menu you can also look at which other pages are linking to the different pages involved as well as launch it in the browser if needed.

IISSEORedirect2

Similarly with all the other violations it tries to explain the reason it is being flagged as well as recommended actions to follow for each of them.

IIS Search Engine Optimization Toolkit can also help you find all the different types of redirects and the locations where they are being used in a very easy way, just select Content->Status Code Summary in the Dashboard view and you will see all the different HTTP Status codes received from your Web site. Notice in the image below how you can see the number of redirects (in this case 18 temporary redirects and 2 permanent redirects). You can also see how much content they accounted for, in this case about 2.5 kb (Note that I've seen Web sites generate a large amount of useless content in redirect traffic, speaking of spending in bandwidth). You can double click any of those rows and it will show you the details of the URL's that returned that and from there you can see who links to them, etc.

IISSEORedirect3

So what should I do?

  1. Know your Web site. Run Site Analysis against your Web site and see all the different redirects that are happening.
  2. Try to minimize redirections. If possible with the knowledge gain on 1, make sure to look for places where you can update your content to reduce the number of redirects.
  3. Use the right redirect. Understand what is the intent of the redirection you are trying to do and make sure you are using the right semantics (is it permanent or temporary). Whenever possible prefer Permanent Redirects 301.
  4. Use URL Rewrite to easily configure them . URL Rewrite allows you to configure a set of rules using both regular expressions and wildcards that live along with your application (no-administrative privileges required) that can let you set the right redirection status code. A must for SEO. More on this on a future blog.

Summary

So going back to the original question: "are redirects bad for Search Engine Optimization?". Not necessarily, they are an important tool used by Web application for many reasons such as:

  • Canonicalization. Ensure that users are accessing your site with www. or without www. use permanent redirects
  • Page impressions and analytics. Using temporary redirects to ensure that the original link is preserved and counters work as expected.
  • Content reorganization. Whether you are changing your host due to a brand change or just renaming a page, you should make sure to use permanent redirects to keep your page rankings.
  • etc

Just make sure you don't abuse them by having redirects to redirects, unnecessary redirects, infinite loops, and use the right semantics.

Comments

  • Anonymous
    June 13, 2009
    Hi,Can i have a solution on, how to do this in a blogspot hosted domain. I have a problem of 302 temporary , 301 redirect - creating duplicate content issues.Thank u
  • Anonymous
    January 06, 2010
    @Rajesh: as far as I know you cannot redirect from blogspot to another.BTW, I think 301 can help protect google pagerank.  
  • Anonymous
    January 19, 2010
    The comment has been removed
  • Anonymous
    April 15, 2010
    I'm using meta redirects with time=0s, is it OK?
  • Anonymous
    May 15, 2010
    Very usefull for me (seo newbie), thanks all
  • Anonymous
    May 31, 2010
    Thank you for the excellent post and it certainly prove to be very useful with what you had share with us. Redirect usually is the best search engine friendly option for most web site who has a change of url as well as content redirection. I would also like to share on milandesign.sg with amazing portfolio for web design and development. The SEO marketing they had done for us is very useful.
  • Anonymous
    June 01, 2010
    @Rajesh: i think you can redirect blogspot to another by insert one code to header
  • Anonymous
    June 02, 2010
    Good article, many thanks
  • Anonymous
    September 13, 2010
    i really appreciate it that you shared with us such a informative post.
  • Anonymous
    December 15, 2010
    Excellent tips .I really appreciate all these points, and I agree completely…<a href="http://www.yamansoft.com">Web Tasarımı</a>
  • Anonymous
    January 09, 2011
    if you want to use seo too kit, than i will suggest you to visit the link belowwww.raiseitsolutions.com/.../viewtopic.phpits work really great you can try this.thank you very much.
  • Anonymous
    October 27, 2011
    Thank your information.www.nuochoashop.com