What's the difference between 301 and 302 in HTTP?

A 301 (moved permanently) status means the resource has been permanently moved to a new location. The client (browser) should use the new location instead of the old one in future.

A 302 (found) status means the resource is temporarily located elsewhere. The client should use the given location for the current request, but in the future should continue to use the old location.

Both status codes will have the effect of having the browser follow a redirect. You should choose to use a 301 or 302 status depending on whether the redirect is permanent or temporary.

More information about these HTTP response codes can be found in RFC 2616.


When a search engine spider founds 301 status code in response header of a webpage, it understand that this webpage is no longer exist, it searches for location header in response pick the new URL and replace the indexed URL with the new one and also transfer pagerank.

So search engine refreshes all indexed URL that is no longer exist (301 found) with the new URL, this will retain your old webpage traffic, pagerank and divert it to the new one (you will not lose you traffic of old webpage).

Browser: if a browser founds 301 status code then it caches the mapping of old URL with the new URL, the client/browser will not attempt to request the original location but use the new location from now on until cache remove.

When search engine spider founds 302 status for a webpage, it will only redirect temporarily to the new location and crawl both of the page,old webpage URL still exists in search engine database and it always attempt to request the old location and crawl it, the client/browser will still attempt to request the original location.

Read more about how to implement it in asp.net c# and how what is the impact in search engine - http://www.dotnetbull.com/2013/08/301-permanent-vs-302-temporary-status-code-aspnet-csharp-Implementation.html