When a browser or search engine bot requests a web page, the server answers every request with a three-digit number. This number, the HTTP status code, tells the client whether the request succeeded, whether the page has moved or whether something went wrong. Most users only ever see the 404 page, but every request returns a code behind the scenes, and using these codes correctly matters for both user experience and SEO. This article covers the code classes, the most common codes and how to use them properly.

Status code classes

The first digit indicates which class a response belongs to. Not every code is an error; on a healthy site most requests return 200 or 304.

ClassMeaningExample
1xxInformational: request received, processing continues100 Continue, 103 Early Hints
2xxSuccess: the request was processed200 OK, 201 Created
3xxRedirection: the resource is elsewhere301, 302, 304
4xxClient error: something is wrong with the request404 Not Found, 403 Forbidden
5xxServer error: the server could not fulfil the request500, 503

2xx: successful responses

  • 200 OK: the request succeeded and the content was returned. Every live page should return this.
  • 201 Created: a new resource was created; common in APIs when a record is added.
  • 204 No Content: the action succeeded but there is nothing to return, for example after a delete.

3xx: redirects

Redirect codes tell the client that the requested resource lives at another address. This is the class that deserves the most attention for SEO.

  • 301 Moved Permanently: the page has moved for good. Used when a domain changes or a URL structure is reworked; search engines start treating the new address as canonical.
  • 302 Found and 307 Temporary Redirect: temporary redirects; the original address is kept. 307 redirects without changing the request method (for example POST).
  • 308 Permanent Redirect: the permanent counterpart of 301 that preserves the request method.
  • 304 Not Modified: the content has not changed and the browser can use its cached copy, saving bandwidth and time.

Avoid redirect chains (A → B → C); point old addresses straight at the final destination. Chains slow down page loads and waste crawl budget.

4xx: client errors

  • 400 Bad Request: the request is malformed.
  • 401 Unauthorized: authentication is required.
  • 403 Forbidden: even if authenticated, the client has no permission.
  • 404 Not Found: the page could not be found. A helpful 404 page that points users to the home page, search or related content is good practice.
  • 410 Gone: the page was removed deliberately and permanently.
  • 429 Too Many Requests: too many requests were sent in a given time; used for rate limiting in APIs.
Pages that show a "page not found" message but return 200 are a common mistake that search engines flag as "soft 404s". The visible message and the returned code should always agree.

5xx: server errors

  • 500 Internal Server Error: an unexpected error occurred on the server, usually caused by a problem in application code.
  • 502 Bad Gateway: a gateway or proxy received an invalid response from the upstream server.
  • 503 Service Unavailable: the server is temporarily unable to serve requests. During planned maintenance, send it with a Retry-After header.
  • 504 Gateway Timeout: the upstream server did not respond in time.

Persistent 5xx errors can lead search engines to crawl your site less often and, if they last long enough, drop pages from the index.

How to check status codes

The Network tab in the browser's developer tools shows the status code of every request. On the command line, curl -I https://example.com fetches only the response headers. The page indexing reports in Google Search Console list the 404s, redirects and server errors the search engine encountered on your site. Running these checks regularly after a migration or redesign helps you catch problems early.

Conclusion

HTTP status codes are part of the language your site speaks with users and search engines. Correct redirects, consistent error pages and monitored server errors protect both the visitor experience and search visibility. On the sites we build at Dijicrea, we plan redirect maps, error pages and status codes before launch, and during migrations we make sure every old address is passed correctly to its new counterpart.