HTTP Status Codes

Understanding HTTP Status Codes: 200, 301, 404, 500 and 503

Every response from a web server starts with a three-digit status code. Learn what the five classes mean, which codes matter most for website owners, and how they affect visitors, monitoring and search engines.

HTTP Status Codes guide cover
Table of contents

Every time a browser, search engine crawler or monitoring tool requests a page, the server's response begins with a three-digit HTTP status code. It's the server's short summary of what happened: success, redirect, a problem with the request or a problem on the server. Knowing the most common codes helps you debug outages, set up redirects correctly and understand what your uptime monitor is telling you.

Status codes are defined in the HTTP specification, currently RFC 9110 (HTTP Semantics). A readable reference is also available on MDN Web Docs.

The five classes of status codes

The first digit defines the class of response:

ClassMeaningExamples
1xxInformational: the request was received and processing continues100 Continue, 101 Switching Protocols
2xxSuccess: the request was received, understood and accepted200 OK, 201 Created, 204 No Content
3xxRedirection: further action is needed, usually following another URL301, 302, 304, 307, 308
4xxClient error: the request has a problem400, 401, 403, 404, 410, 429
5xxServer error: the server failed to fulfil a valid request500, 502, 503, 504

As a website owner, you'll mostly deal with 2xx, 3xx, 4xx and 5xx.

200 OK

200 OK means the request succeeded and the server is returning the requested content. It's what every normal page view should produce.

One trap to be aware of is the "soft 404": a page that says "not found" or shows an error message but still returns status 200. Browsers display it fine, but search engines and monitoring tools can be misled into thinking the page is healthy. Error pages should return an error status code.

Redirects: 301, 302, 307 and 308

301 Moved Permanently

A 301 tells clients that the resource has moved permanently to the URL in the Location header. Use it when you change a page's address, move from HTTP to HTTPS, or consolidate www and non-www versions of a domain. Search engines treat a permanent redirect as a strong signal to index the new URL instead of the old one.

302 Found and 307 Temporary Redirect

These indicate a temporary move: the original URL should still be used in the future. Use them for short-term situations, such as temporarily redirecting a seasonal page. The difference is technical: a 307 guarantees that the request method (for example POST) is kept on the redirected request, while clients have historically changed POST to GET after a 302.

308 Permanent Redirect

The permanent counterpart of 307: like a 301, but the request method must not change.

Avoid redirect chains and loops

Each redirect costs an extra round trip. A chain such as http://example.com → https://example.com → https://www.example.com → https://www.example.com/ slows down every first visit. Ideally, any old URL redirects once, directly to its final address. A redirect loop, where URLs redirect back to each other, makes the page unreachable. Our HTTP status checker shows every step of a redirect chain.

304 Not Modified

304 is not a real redirect. It tells a browser that its cached copy is still valid, so the content doesn't need to be downloaded again. It's a normal, healthy part of caching.

Client errors: 4xx

400 Bad Request

The server couldn't understand the request, for example because of malformed syntax. Occasional 400s are usually caused by broken clients or bots; many of them from real users suggest a bug.

401 Unauthorized and 403 Forbidden

401 means authentication is required or failed. 403 means the server understood who you are (or that you're anonymous) but refuses access. A 403 on a page that should be public often points to wrong file permissions, a security plugin, or a firewall rule blocking certain visitors.

404 Not Found

404 means the server can't find anything at that URL. It's a normal response for mistyped addresses and deleted pages. Problems arise when important pages return 404 by accident, for example after a migration that changed URL structures without redirects.

Good practice: give your 404 page helpful navigation, monitor your logs for frequently requested missing URLs, and add 301 redirects for pages that moved.

410 Gone

410 says the resource was removed intentionally and won't come back. It's a clearer signal than 404 when you've deliberately deleted content.

429 Too Many Requests

The client sent too many requests in a given time and is being rate-limited. A Retry-After header can tell it when to try again.

Server errors: 5xx

5xx codes mean the server, or something behind it, failed. These are the codes uptime monitoring cares most about, because they usually affect every visitor.

500 Internal Server Error

A generic error: something went wrong and the server has no more specific code to report. Typical causes include application bugs, fatal errors after a plugin or code update, misconfigured server files and database connection failures. The details are in the application and web server error logs, not in the response.

502 Bad Gateway

Many websites use a reverse proxy, load balancer or CDN in front of the application. A 502 means that proxy received an invalid response from the server behind it, often because the application process crashed or isn't running.

503 Service Unavailable

503 means the server is temporarily unable to handle the request, usually because it's overloaded or in maintenance mode. It's the correct code to use for planned maintenance. Adding a Retry-After header tells clients, including search engine crawlers, when to come back, and signals that the outage is temporary.

504 Gateway Timeout

The proxy or load balancer didn't receive a response from the upstream application in time. Slow database queries, long-running requests and overloaded application servers are common causes.

How status codes affect uptime monitoring

An uptime monitor has to decide which responses count as "up". A common and sensible rule, and the one UptimeStats uses, is:

  • 2xx and 3xx: up. Redirects are followed (up to 5 hops), and the final response is evaluated.
  • 4xx and 5xx: down. A homepage that returns 404 or 500 isn't working for visitors.
  • No response at all (timeouts, DNS failures, TLS errors, refused connections): down.

This is why a server that "answers" isn't necessarily healthy. Monitoring the status code, not just whether the server responds, is what catches application failures.

How status codes affect SEO

  • 200 on real content and an appropriate error code on error pages helps search engines understand your website accurately.
  • 301 redirects are the standard way to move content permanently while preserving its search visibility.
  • 404 and 410 on removed pages are normal and don't harm the rest of the site.
  • 503 with Retry-After is the right way to handle short maintenance windows.
  • Persistent 5xx errors can lead crawlers to slow down and, if they last long enough, affect indexing.

How to check a page's status code

Use the free HTTP status code checker to see the code, the redirect chain and key response headers for any public URL. From a terminal, run:

curl -I https://example.com

Browser developer tools also show the status of every request in the Network tab. If you only need to know whether a site is up and what it returns right now, the free website status checker gives you a quick answer.

To be alerted automatically when your pages start returning errors, set up free monitoring. For the bigger picture of why websites fail, see What Causes Website Downtime?

Related articles

How DNS Problems Can Make Your Website Unavailable

Your server can be running perfectly and visitors still can't reach it if DNS fails. Learn how DNS resolution works, the problems that cause outages, how to diagnose them and how to change records safely.