TidyURLs
Go to Tools
BLOG
The TidyURLsJournal

Practical guides, tutorials, and insights about URLs, SEO, web development, and online marketing. Learn, troubleshoot, and get the most of the web.

Back to the Journal
TidyURLs Journal

HTTP Status Codes Explained: 200, 301, 404, 500 & More

Practical insights, clear explanations, and useful ideas for understanding the web.

October 18, 202612 min read5 topics
HTTP Status Codes Explained: 200, 301, 404, 500 & More
Explore the details

Advertisement

#HTTP#status-codes#SEO#web-development#troubleshooting
October 18, 202612 min read

HTTP Status Codes Explained: 200, 301, 404, 500 & More

A browser displaying an HTTP response and website diagnostics

Every time you open a website, submit a form, or request an image, your browser communicates with a server using HTTP. One of the most important parts of that communication is the HTTP status code: a three-digit number that indicates what happened to your request.

Understanding these codes helps you troubleshoot broken pages, diagnose server problems, manage redirects, and identify technical SEO issues.

In this guide, you'll learn what HTTP status codes mean, how the five status-code classes work, which codes you should know, and how to check a URL's response.

What Is an HTTP Status Code?

An HTTP status code is a three-digit number returned by a server in response to an HTTP request. It gives the client a general indication of whether the request succeeded, requires further action, or encountered a problem.

For example, when you visit a webpage:

  • 200 OK usually means the request succeeded.
  • 301 Moved Permanently indicates that a resource has permanently moved to another URL.
  • 404 Not Found means the server cannot find the requested resource.
  • 500 Internal Server Error indicates that the server encountered an unexpected condition.

Status codes are part of the HTTP protocol and are used by browsers, search-engine crawlers, APIs, and other applications.

Important: A status code alone doesn't always tell the whole story. A page returning 200 OK can still contain an application error, and a server can return a technically valid response while displaying an unhelpful page.

The Five Classes of HTTP Status Codes

HTTP status codes are divided into five classes based on their first digit.

ClassRangeMeaning
1xx100–199Informational
2xx200–299Successful
3xx300–399Redirection
4xx400–499Client errors
5xx500–599Server errors

Let's examine each class.

1xx: Informational Responses

Informational responses indicate that the server has received the request and is continuing to process it, or that it is communicating additional information about the connection.

These responses are usually handled automatically by browsers and HTTP clients.

100 Continue

The server has received the request headers, and the client can proceed with sending the request body.

This is useful for requests that upload large amounts of data, because the client can wait for confirmation before transmitting the entire body.

101 Switching Protocols

The server agrees to switch protocols as requested by the client. This can occur when upgrading an HTTP connection to another protocol, such as WebSocket.

Do informational codes matter for SEO?

Usually, not directly. Search engines generally evaluate the final response and the content they can access rather than treating an informational response as the final result.

2xx: Successful Responses

A 2xx response indicates that the request was successfully received, understood, and accepted or processed.

200 OK

200 OK is the most familiar HTTP status code. It generally means that the request succeeded.

For a normal webpage, it usually means the server returned the requested document successfully.

SEO impact: Important pages that should appear in search results generally need to be accessible and return an appropriate successful response. However, a 200 response does not guarantee that a page will be indexed.

201 Created

The request succeeded and resulted in the creation of a resource.

For example, an API might return 201 Created after successfully creating a new user or database record.

202 Accepted

The server accepted the request for processing, but processing has not necessarily finished.

This is common in APIs that start background jobs, such as generating a report or processing a large file.

204 No Content

The request succeeded, but the response contains no content.

This can be appropriate for API operations that don't need to return a response body. It is generally not the right response for an ordinary webpage that is expected to display content.

3xx: Redirection Responses

Redirection status codes indicate that additional action is needed, often because the requested resource is available at another URL.

Redirects are particularly important for technical SEO because they help websites handle URL changes, domain migrations, and outdated links.

301 Moved Permanently

A 301 indicates that a resource has permanently moved to a new URL.

For example:

https://example.com/old-page → https://example.com/new-page

Use a permanent redirect when the original URL has genuinely been replaced and you want users and search engines to use the new location.

302 Found

A 302 indicates a temporary redirect. The resource is being served from another URL for now, but the original URL may be used again.

It can be appropriate for temporary campaigns, temporary routing, or short-term changes.

303 See Other

A 303 tells the client to retrieve another resource, generally using a GET request. It is often used after a form submission to direct the user to a confirmation page.

304 Not Modified

A 304 indicates that a cached representation can still be used because the resource hasn't changed according to the relevant conditional request.

It helps reduce unnecessary data transfers and improve performance.

307 Temporary Redirect

A 307 is a temporary redirect that preserves the request method. For example, a POST request should remain a POST when the client follows the redirect.

308 Permanent Redirect

A 308 is a permanent redirect that preserves the request method.

Which redirect should you use?

Status codeIntended useRequest method preserved?
301Permanent redirectNot guaranteed by the original specification
302Temporary redirectNot guaranteed by the original specification
307Temporary redirectYes
308Permanent redirectYes

For ordinary browser navigation, 301 and 302 are common choices. When preserving the HTTP method is essential, consider 307 or 308.

SEO note: Google treats 301 and 308 as permanent redirects and 302 and 307 as temporary redirects. Redirects are signals, not guarantees, about which URL should be indexed. Choose the status code based on the actual intent rather than trying to manipulate rankings.

If you want to investigate a redirect, try the TidyURLs Redirect Checker to inspect where a URL leads and whether multiple redirects occur.

4xx: Client Error Responses

A 4xx response indicates that the server encountered a problem with the request. The issue may be an invalid URL, missing authentication, insufficient permissions, or another client-side condition.

400 Bad Request

The server cannot or will not process the request because it considers the request invalid.

Common causes include malformed parameters, invalid request syntax, or missing required information.

401 Unauthorized

The request lacks valid authentication credentials.

Despite its name, 401 generally concerns authentication: the client needs to establish who it is.

403 Forbidden

The server understood the request but refuses to fulfill it.

The client may be authenticated and still lack permission to access the resource.

404 Not Found

The server cannot find the requested resource.

Advertisement

Common causes include:

  • A page that was deleted or moved.
  • A misspelled URL.
  • An outdated link.
  • A broken internal link.
  • A resource that never existed.

SEO impact: A genuine missing page can appropriately return 404. You don't need to redirect every deleted URL to the homepage. If an equivalent replacement exists, redirecting to it may be appropriate. Otherwise, return a proper not-found response and provide a helpful error page.

A custom 404 page should help visitors find useful content, but it should still return the actual 404 status rather than 200 OK.

405 Method Not Allowed

The server recognizes the request method but doesn't allow it for that resource.

For example, an endpoint might accept GET requests but reject DELETE requests.

408 Request Timeout

The server did not receive a complete request within the time it was willing to wait.

410 Gone

The resource is no longer available, and the server indicates that this is likely to be permanent.

Unlike 404, which doesn't necessarily indicate whether the absence is permanent, 410 explicitly communicates that the resource is gone.

418 I'm a Teapot

This code originated as an April Fools' joke in an Internet specification. It is not a normal response for everyday website troubleshooting, though some implementations use it for humorous or specialized purposes.

429 Too Many Requests

The client has sent too many requests in a given period.

This commonly appears with API rate limits, automated requests, and abuse prevention. A response may include a Retry-After header indicating when the client can try again.

5xx: Server Error Responses

A 5xx response indicates that the server failed to fulfill an apparently valid request.

These errors often require investigation by the website owner or infrastructure provider.

500 Internal Server Error

The server encountered an unexpected condition and could not complete the request.

Possible causes include application bugs, unhandled exceptions, incorrect server configuration, or database failures.

501 Not Implemented

The server doesn't support the functionality required to fulfill the request.

502 Bad Gateway

A server acting as a gateway or proxy received an invalid response from an upstream server.

For example, a reverse proxy might return 502 if the application server it contacts is unavailable or responds incorrectly.

503 Service Unavailable

The server is temporarily unable to handle the request, perhaps because of maintenance or overload.

A Retry-After header can indicate when the client should try again.

504 Gateway Timeout

A gateway or proxy did not receive a timely response from an upstream server.

This can happen when an application server is overloaded or a dependency takes too long to respond.

How do server errors affect SEO?

Occasional server errors do not automatically remove a page from search results. However, persistent or widespread failures can prevent search engines from crawling content reliably and may eventually affect indexing.

If your website returns 5xx errors repeatedly, investigate server logs, database availability, application exceptions, and upstream services.

How to Check an HTTP Status Code

You can check a URL's status code using several methods.

Method 1: Use an online HTTP status checker

An online checker can show the response code without requiring you to install software.

  1. Open the TidyURLs HTTP Status Checker.
  2. Enter the URL you want to inspect.
  3. Run the check.
  4. Review the response status and any available redirect information.

This is convenient for quickly checking individual pages.

Method 2: Use your browser's Developer Tools

In Chrome or Edge:

  1. Open the webpage.
  2. Press F12 to open Developer Tools.
  3. Select the Network tab.
  4. Reload the page.
  5. Select the main document request.
  6. Look for the status code in the request details.

This method is especially useful when a website behaves differently depending on browser requests, authentication, or other resources.

Method 3: Use curl

If you have a terminal installed, you can inspect response headers with curl:

curl -sS -o /dev/null -w "%{http_code}\n" \
  https://example.com/

To inspect the response headers:

curl -sSI https://example.com/

To follow redirects and inspect the final response:

curl -sSIL https://example.com/

The last command follows redirects and displays headers for the responses along the way. Note that curl -I sends a HEAD request, which can behave differently from a normal browser GET request. If a server handles HEAD incorrectly, test with a GET request instead.

Only inspect URLs you are authorized to access.

Common HTTP Status Code Problems and How to Fix Them

ProblemPossible causeWhat to investigate
Unexpected 404Missing page or incorrect URLCheck links, route configuration, and whether the resource exists
Unexpected 403Permissions or security rulesReview authentication, access policies, and firewall settings
429 responsesRate limitingReduce request frequency and check rate-limit guidance
Repeated 301 or 302 responsesRedirect chainUpdate links to point directly to the destination where appropriate
500 errorsApplication failureReview server logs and exception traces
502 or 504 errorsUpstream server problemCheck proxy configuration, server health, and request timeouts
503 errorsMaintenance or overloadInvestigate capacity, dependencies, and retry behavior

HTTP Status Codes and SEO: What Website Owners Should Know

HTTP status codes are only one part of technical SEO, but they can reveal important problems.

Here are some practical guidelines:

  • Return 200 for working pages. Avoid returning success responses for pages that actually failed to load.
  • Use permanent redirects for permanent URL changes. Update internal links to point directly to the preferred destination.
  • Let genuinely missing pages return 404 or 410. Don't redirect every missing page to an unrelated destination.
  • Investigate recurring server errors. Make sure search engines can reliably access important pages.
  • Avoid redirect chains where practical. Direct links to final destinations are easier to maintain and avoid unnecessary requests.
  • Check canonical URLs separately. A successful response doesn't automatically mean the canonical URL is correct.
  • Test important pages after deployments. Routing changes can accidentally introduce 404s, redirect loops, or server errors.

Google's documentation on HTTP status codes and network errors provides additional guidance for site owners.

Frequently Asked Questions

Is a 404 error always bad for SEO?

No. A 404 is appropriate when a page genuinely doesn't exist. Problems arise when important pages unexpectedly return 404, or when broken internal links send visitors to missing resources.

Is a 301 better than a 302 for SEO?

Neither is inherently better. Use 301 when the move is permanent and 302 when it is temporary. Google can interpret both as redirect signals, but the status should accurately reflect your intended behavior.

Can a page return 200 and still be broken?

Yes. A website can return 200 OK while displaying an application error, an empty page, or a misleading not-found message. This is sometimes called a soft 404 when the response looks like a missing page to a search engine.

What is the difference between 401 and 403?

401 generally means valid authentication is missing. 403 means the server refuses access, even if the client is identified or authenticated.

What is the difference between 502 and 504?

502 Bad Gateway means a gateway received an invalid response from an upstream server. 504 Gateway Timeout means the gateway did not receive a response in time.

Do HTTP status codes affect website speed?

Some can affect perceived performance indirectly. Redirect chains add extra round trips, while server errors can force visitors to retry. The status code itself is not a direct measurement of page speed.

Final Thoughts

HTTP status codes help you understand how a server responds to requests, from successful page loads to redirects and application failures. Knowing the difference between 200, 301, 404, and 500 makes it easier to troubleshoot websites and maintain a healthy technical SEO setup.

When something goes wrong, start by checking the status code, inspect the response headers, and follow the request path to identify where the problem occurs.

Need to investigate a URL? Try the TidyURLs HTTP Status Checker or Redirect Checker to start diagnosing the response.


Further Reading