Redirecting Using 301 and 302

The 301 and 302 codes are the HTTP status codes used for redirection. These codes indicate that another request must be made in order to fulfill the HTTP request- the content is located elsewhere. When a web page replies with either of these codes, it does not return any HTML content, but includes an additional location HTTP headers that indicates another URL where the content is found.

When a redirect occurs, the URL that issues the redirect doesn’t return any content, but indicates the new URL that should be referenced instead. Note that in case the user agent is a search engine spider or a software application, there is not a user involved in the process. Search engine follow the same basic process to update SERPs when they encounter a redirect.
Redirection can be chained, that is, one redirect can point to a page that, in turn, redirect again. However, multiple redirects should be avoided to the extent that it is possible. A maximum of five redirections was stipulated by an older version of RFC 2616, but that limit was later lifted. Regardless, it is wise to avoid chained redirects because they can slow down site spidering- spiders may only schedule the results of the redirection for spidering instead of immediately fetching it.
The HTTP standard actually contains many redirection status codes.
In practice only the 301 and 302 status codes are used for redirection. Furthermore, because browsers are known to struggle with certain of the other status codes, it is probably wise to avoid them, even if they seem more relevant or specific. It can only be assumed that search engine may also struggle with them, or at least that it is not entirely understood how they should be interpreted.


JavaScript, ASP.Net & PHP Web Developer. Connect with me on Facebook and Twitter.

Share This Post

Related Articles

Powered by Paras Babbar · Designed by Paras Babbar