GuidesWeb explained

HTTP status codes: 200, 301, 404, 500 explained

By the Banzai Labs teamUpdated on 2 min read

The five families

Family Meaning Who must act
1xx Request being processed No one
2xx Success No one
3xx The resource is elsewhere The browser follows on its own
4xx The request is wrong Whoever is asking
5xx The server failed Whoever is hosting

The codes worth knowing

Code Name What it says
200 OK The page is served normally
301 Moved Permanently The page has changed address for good
302 Found The page is elsewhere for now
304 Not Modified The copy kept by the browser is still good
401 Unauthorized You need to log in
403 Forbidden Logged in or not, access is refused
404 Not Found Nothing at this address
410 Gone The page existed and will not come back
429 Too Many Requests The server asks you to slow down
500 Internal Server Error The site code crashed
502 Bad Gateway The front server gets no answer from the application
503 Service Unavailable The server is overloaded or under maintenance

What search engines do with them

  • 200: the page can be indexed.
  • 301: the old address is replaced by the new one, and the links it received follow.
  • 404 and 410: the page leaves the index over time.
  • 503: the crawler understands it is temporary and comes back later. A 503 that lasts ends up dropping the pages.

Common mistakes

  • The error page that answers 200. The visitor reads “page not found”, but the engine receives a valid page and indexes it.
  • Redirect chains. A sends to B, which sends to C. Every hop slows things down: redirect straight to the final address.
  • A 302 for a permanent move. The old address stays in the results.
  • Maintenance that answers 200 or 404. During maintenance, the right code is 503.

Seeing the code of a page

curl -I https://example.com/

The first line of the response gives the code. Search Console also lists pages in error: see the Search Console tutorial.

Frequently asked questions

What is the difference between a 301 and a 302?
A 301 says the page has moved for good: search engines replace the old address with the new one. A 302 says the move is temporary: the old address remains the reference.
Is a 404 error bad for SEO?
Not in itself. A page that no longer exists should answer 404. The problem is internal links pointing to it and useful pages deleted without a redirect.
How do I see the code a page returns?
In the Network tab of the browser developer tools, or with the curl -I command followed by the address.

Read next

All guides