Importance of 301 redirects

SEO is a continuous activity that should be performed for every website, to bring in many new visitors/leads to your site. One of the key factor in the optimization, is to build number of inbound links from trusted sites. If you have done building up these inbound links and have run digital marketing campaigns to achieve the same. And in the course if you change the target URL name, all those inbound links will hit 404. Your link building efforts are just a waste or lost for nothing.

I have seen many popular websites have dropped from the Google Search Result page (SERPs) because of this simple negligence they do while changing their site structure.

Following article aims to cover following questions

  • A live case explaining the issue on layman terms ?
  • How do you maintain transfer your link popularity to the new URL ?
  • How to keep up those URLs from ending up with 404 ?

Let me consider this website case as a live example (and my self as a newbie for the article sake wink);

Started around 4 months back. I initially submitted my sitemap and it took around 3 weeks for Google to recognize that this site is worth indexing. After which, it indexed around 14 out of submitted 19 URLs. May be it did ignored few URLs because the amount of content in those page are negligible or not in alignment with the rest of the site content (Seriously Intelligent).

During the course, for adding in SEO in URLs - I modified the below article on finding prime number from

http://davidsekar.com/sieve-of-eratosthenes-prime

to the below one with the category or parent name in the URL

http://davidsekar.com/algorithms/sieve-of-eratosthenes-prime

I have a good habit of following the URLs listed in google the Google webmaster tool. I noted that the old crawled URL was categorized in error pages as 404. Then I thought that I should resubmit the new URL, but something hit me hard. It took 3 weeks for google to approve link 1 and may be it did put some score based on its content and the age(the duration from which came to existence).

So what would happen to the link popularity that was gained for the initial one?

I decided to do the popularity transfer in a Search Engine friendly way.

So I modified this CMS code to always add an old URL to new URL mapping whenever a page name is changed. As a result, the google webmaster console has removed the 404 error from the report. And the new URL got indexed and I'm pretty sure that my old link popularity and the age of the content in existence are persisted in google Index without being lost.

For .NET framework versions 3.0 and below, you have to set the Response.StatusCode as 301 and redirect as follows

Response.StatusCode = 301;
Response.Redirect("newUrl");

In ASP.NET 3.5 and latter you have following method to do 301/permanent redirection

Response.RedirectPermanent("newURL", true);

For reducing the performance hit caused due to database lookup,  you should have the above redirection in the 404 custom error page. Where you would go through the entire list of old URLs in the mapping table and find the respective new URL and redirect the visitor/search engines accordingly.

I'm planning to share the code written as part of CMS in a followup article soon.

Share your thoughts.