← Blog

HTTP Status Codes Explained: 2xx, 3xx, 4xx, and 5xx

3 min read
#http#status codes#debugging#web development

Every time you visit a website, your browser sends a request to a server, and the server responds with a three-digit number called an HTTP status code. These codes are the "language" of the web, telling your browser whether the request was successful, moved, or if an error occurred. In this guide, we'll break down the most common status codes and what they mean for your site's health.

Understanding HTTP status codes is essential for debugging website issues and maintaining search engine visibility.

1. 2xx: Success

These codes mean the server successfully received, understood, and accepted the request.

  • 200 OK: The standard response for successful web pages.
  • 201 Created: The request was successful and a new resource was created.

2. 3xx: Redirection

These codes indicate that the browser needs to take further action to fulfill the request, usually by going to a different URL.

  • 301 Moved Permanently: Used for SEO when a page has a new permanent home.
  • 302 Found (Temporary): Tells crawlers the move is only temporary.
  • 304 Not Modified: Tells the browser to use its cached version of the page.

3. 4xx: Client Error

These codes mean there was an issue with the request, often caused by the user or the browser.

  • 404 Not Found: The most famous code. The page doesn't exist.
  • 401 Unauthorized: Authentication is required.
  • 403 Forbidden: The server understood the request but refuses to authorize it.
  • 429 Too Many Requests: The user has sent too many requests in a given amount of time (Rate Limiting).

4. 5xx: Server Error

These codes mean the server failed to fulfill an apparently valid request.

  • 500 Internal Server Error: A generic error message when the server encounters an unexpected condition.
  • 502 Bad Gateway: One server on the internet received an invalid response from another.
  • 503 Service Unavailable: The server is currently unable to handle the request (due to maintenance or overload).

How to Audit Your Status Codes

You can check your site's response codes and headers instantly using our diagnostic tools.

Audit your HTTP Status now →

Conclusion

HTTP status codes are the first thing you should check when a website isn't behaving as expected. By monitoring these codes, you can catch errors before your users do and ensure search engines can index your content without issues.

Run a free website status check now →