HTTP Status Codes: What 301, 302, 404 and 500 Really Mean
A practical guide to the status codes you meet most often, the difference between permanent and temporary redirects, and how redirect chains hurt.
The five families
Every HTTP response starts with a three digit status code, and the first digit tells you the family. 1xx codes are informational. 2xx means success. 3xx means the client should look somewhere else. 4xx means the request had a problem. 5xx means the server failed to handle a valid request.
Redirects: permanent or temporary
Redirect codes differ in two ways: whether the move is permanent, and whether the request method is kept.
- 301 Moved Permanently: the page has a new address for good. Search engines transfer the old address to the new one over time.
- 302 Found: a temporary move. Search engines keep the original address in their index.
- 307 Temporary Redirect: temporary, and the method must not change, so a POST stays a POST.
- 308 Permanent Redirect: permanent, and the method must not change.
Use a permanent redirect when you have really moved or merged a page, such as when changing domain or switching from www to the bare domain. Use a temporary one for short term cases such as maintenance or a test.
Client errors you will see
404 Not Found means nothing exists at that address. 410 Gone says the page was removed on purpose and is not coming back, which can help search engines drop it faster. 403 Forbidden means the server understood the request and refuses it. 401 Unauthorized means the request needs valid credentials. Despite its name, 401 is about authentication, while 403 is about permission.
A soft 404 is a page that says not found but returns status 200. Search engines treat these as low quality, so a missing page should return a real 404.
Server errors
500 Internal Server Error is a generic failure inside the application. 502 Bad Gateway and 504 Gateway Timeout come from a proxy or load balancer that could not get a good or timely answer from the server behind it. 503 Service Unavailable means the server is overloaded or down for maintenance, and it can include a Retry-After header telling clients when to come back.
Redirect chains and loops
A chain happens when one redirect leads to another, for example http to https and then non www to www. Every extra hop adds delay and gives crawlers one more chance to give up. Googlebot follows a limited number of hops, so aim for one redirect from any old address to its final destination.
A loop is worse: address A sends to B and B sends back to A, so the browser shows an error. A redirect checker follows each hop and lists the status code at every step, which makes chains and loops easy to spot.