HTTP Status Codes Full List of 40+ Explained & How to Fix Error

HTTP Status Codes: Full List of 40+ Explained & How to Fix Errors

I can see you’ve already provided comprehensive content about HTTP status codes. However, I notice the content is missing the 4xx Client Error section heading. Let me add that heading and ensure the content flows properly:

Every time you visit a website, your browser and the server exchange a tiny conversation — and HTTP status codes are at the heart of it. These three-digit numbers tell you exactly what happened with a request: did it succeed? Was something moved? Did something break? Whether you’re a developer debugging an API, a site owner troubleshooting SEO issues, or just someone curious why a page won’t load, understanding HTTP status codes is essential.

In this guide, we’ll walk through 40+ HTTP status codes, explain what each one means in plain English, and show you how to fix the most common errors you’ll encounter.

What Are HTTP Status Codes?

HTTP Status Codes Full List of 40+ Explained & How to Fix Error

HTTP status codes are standardized responses issued by a web server in response to a client’s request. When your browser requests a web page, the server responds with a three-digit code that indicates the outcome of that request.

These codes are grouped into five classes based on the first digit:

  • 1xx – Informational: The request was received and is being processed.
  • 2xx – Success: The request was successfully received, understood, and accepted.
  • 3xx – Redirection: Further action is needed to complete the request.
  • 4xx – Client Errors: The request contains bad syntax or cannot be fulfilled.
  • 5xx – Server Errors: The server failed to fulfill a valid request.

1xx – Informational Responses

These codes are rarely seen in everyday browsing but are important in technical contexts.

100 Continue The server has received the request headers and the client should proceed to send the request body. This is used to prevent unnecessary large uploads if the server would reject the request anyway.

101 Switching Protocols The server agrees to switch protocols as requested by the client (e.g., switching from HTTP to WebSocket). Common in real-time applications.

103 Early Hints Introduced to improve performance, this tells the browser to start preloading resources while the server prepares the full response.

2xx – Success Codes

These are the codes you want to see. They confirm everything went as expected.

200 OK The gold standard of HTTP responses. The request succeeded, and the response body contains the requested data. This is what you see when a webpage loads normally or an API call returns data correctly.

201 Created The request was successful and a new resource was created as a result. Commonly returned when you submit a form, register an account, or POST data to an API.

202 Accepted The request has been received but processing is not yet complete. Often used in asynchronous operations like batch processing jobs.

204 No Content The request succeeded, but there’s no content to return. You’ll see this on DELETE requests or certain PUT operations where the server confirms success but has nothing to send back.

206 Partial Content The server is delivering only part of the resource. This is common when downloading large files in chunks or streaming video content.

3xx – Redirection Codes

These codes mean the client must take additional action to complete the request.

301 Moved Permanently The requested resource has been permanently moved to a new URL. Search engines update their index to the new URL. This is the most SEO-friendly redirect to use when you change a URL for good.

How to fix: If you own the site, make sure your 301 redirect is pointing to the correct destination. If you’re a visitor and you encounter it, just follow the redirect — your browser should do this automatically.

302 Found (Temporary Redirect) The resource is temporarily at a different URL. Unlike 301, search engines keep the original URL in their index.

How to fix: Use 302 only for genuinely temporary redirects. Using it when you mean 301 can hurt SEO.

304 Not Modified The cached version of the page is still valid. The server tells the browser “your cached copy is up to date — use that instead of downloading the page again.” This speeds up load times significantly.

307 Temporary Redirect Similar to 302 but explicitly preserves the HTTP method. If a POST request is redirected, it must remain a POST at the new location.

308 Permanent Redirect Like 301 but method-preserving. A POST request redirected with 308 stays a POST at the new URL.

4xx – Client Error Codes

These errors indicate that something went wrong on the client side — meaning the request itself was flawed or unauthorized.

400 Bad Request The server couldn’t understand the request due to invalid syntax. This often happens with malformed URLs, corrupt request data, or invalid JSON in API calls.

How to fix: Double-check the URL for typos, ensure query parameters are properly encoded, and validate any JSON or form data you’re sending.

401 Unauthorized Authentication is required and has either not been provided or has failed. The name is a bit misleading — it’s actually about authentication, not authorization.

How to fix: Make sure you’re logged in or providing valid credentials. For API access, check that your API key or token is correct and hasn’t expired.

403 Forbidden The server understood the request but refuses to authorize it. Unlike 401, authentication won’t help here — you simply don’t have permission to access this resource.

How to fix: Check your file permissions on the server (especially on Linux/Apache, where incorrect chmod settings cause this). For websites, verify you have the right access level or contact the site owner.

404 Not Found Probably the most famous HTTP error. The server can’t find the requested resource. The page may have been deleted, the URL may be wrong, or the content may have moved without a redirect.

How to fix: Check for typos in the URL. If you’re a site owner, set up proper 301 redirects for deleted or moved pages, and configure a helpful custom 404 page. Regularly audit for broken links using tools like Screaming Frog or Google Search Console.

405 Method Not Allowed The HTTP method used in the request (GET, POST, DELETE, etc.) is not supported for the targeted resource.

How to fix: Check your API documentation to confirm which methods the endpoint accepts. Make sure you’re not using GET where POST is required.

408 Request Timeout The server timed out waiting for the client to complete the request. This can happen on slow connections or large file uploads.

How to fix: Check your internet connection. If you’re a developer, increase the server’s timeout threshold or optimize how data is being sent.

409 Conflict The request conflicts with the current state of the server. Common when trying to create a resource that already exists or when version conflicts occur in collaborative editing.

How to fix: Review the state of the resource before making the request. In APIs, this often means you need to fetch the latest version and reapply your changes.

410 Gone The resource has been permanently deleted and will not return. Unlike 404, which is ambiguous, 410 explicitly signals permanent removal.

How to fix: For SEO, use 410 instead of 404 for content you’ve intentionally removed to help search engines de-index it faster.

413 Content Too Large The request body exceeds the server’s limits. Frequent when uploading large files.

How to fix: On Apache, increase the LimitRequestBody value. On Nginx, raise client_max_body_size. Alternatively, compress files before uploading.

414 URI Too Long The URL provided is longer than what the server can process.

How to fix: Move query parameters to the request body (using POST instead of GET) and shorten the URL.

415 Unsupported Media Type The server doesn’t support the media format of the request data. For example, sending XML to an endpoint that only accepts JSON.

How to fix: Check the API docs for accepted content types. Set the correct Content-Type header in your request.

422 Unprocessable Entity The server understands the content type and syntax, but the request contains semantic errors — for example, missing required fields in a form submission.

How to fix: Validate your data before sending. Check the API’s response body for field-specific error messages.

429 Too Many Requests You’ve sent too many requests in a given amount of time. This is rate limiting in action.

How to fix: Slow down your requests, implement exponential backoff in your code, or contact the API provider to increase your rate limit. Check the Retry-After header for guidance on when to retry.

5xx – Server Error Codes

These indicate that the server failed to fulfill a valid request. The problem is on the server’s end, not yours.

500 Internal Server Error A generic catch-all error meaning something went wrong on the server, but the server doesn’t know exactly what. This is one of the most frustrating errors because it’s vague by design.

How to fix: Check server error logs for details. Common causes include misconfigured .htaccess files, PHP errors, failed database connections, or broken code deployments.

501 Not Implemented The server doesn’t support the functionality required to fulfill the request. For example, it doesn’t recognize the HTTP method used.

How to fix: This is usually a server-side issue. Ensure the method you’re using is supported by your server software.

502 Bad Gateway The server, while acting as a gateway or proxy, received an invalid response from an upstream server. Common with Nginx or load balancers passing requests to app servers.

How to fix: Restart the upstream server or application. Check firewall rules and make sure backend services are running. Inspect proxy logs for timeout or connection errors.

503 Service Unavailable The server is temporarily unable to handle the request, usually due to overload or scheduled maintenance.

How to fix: Wait and retry. If you’re a site owner, scale your server resources, enable a maintenance page with the proper Retry-After header, and investigate what’s causing the overload.

504 Gateway Timeout The gateway or proxy server did not receive a timely response from the upstream server.

How to fix: Increase timeout settings in your proxy configuration. Optimize slow database queries or application processes causing the delay.

505 HTTP Version Not Supported The server doesn’t support the HTTP protocol version used in the request.

How to fix: Ensure your client or server software supports modern HTTP versions (HTTP/1.1, HTTP/2, or HTTP/3).

507 Insufficient Storage The server is unable to complete the request because the disk space required to store data is unavailable.

How to fix: Free up server disk space, expand storage, or implement storage quotas for users.

511 Network Authentication Required The client needs to authenticate to gain network access. Common with captive portals in hotels or public Wi-Fi networks.

How to fix: Open a browser and look for a network login page. This often appears automatically on first access.

Quick Reference: HTTP Status Codes at a Glance

Code Name Category Common Cause
200 OK Success Normal success
201 Created Success New resource created
204 No Content Success Delete/update success
301 Moved Permanently Redirect URL changed permanently
302 Found Redirect Temporary redirect
304 Not Modified Redirect Cached content still valid
400 Bad Request Client Error Malformed request
401 Unauthorized Client Error Login required
403 Forbidden Client Error No permission
404 Not Found Client Error Page doesn’t exist
405 Method Not Allowed Client Error Wrong HTTP method
409 Conflict Client Error Resource state conflict
410 Gone Client Error Content permanently removed
422 Unprocessable Entity Client Error Validation failure
429 Too Many Requests Client Error Rate limit hit
500 Internal Server Error Server Error Server-side crash
502 Bad Gateway Server Error Upstream server issue
503 Service Unavailable Server Error Server overloaded
504 Gateway Timeout Server Error Upstream timeout

HTTP Status Codes and SEO: What You Need to Know

HTTP status codes have a direct impact on your search engine rankings. Here’s a quick breakdown of what matters:

301 redirects pass link equity (PageRank) to the destination URL. They’re the right choice for permanent URL changes. Chains of multiple redirects slow down crawl speed and dilute link equity, so keep them direct.

404 errors for important pages can cause you to lose rankings if crawlers can’t find content. Use Google Search Console’s Coverage report to monitor for unexpected 404s and fix them with 301 redirects.

410 Gone signals to search engines that content has been intentionally removed, helping them de-index pages faster than a 404 would.

5xx errors during a Googlebot crawl cause the crawler to back off temporarily. Persistent 5xx errors can lead to indexing drops. Monitor server uptime and error logs carefully.

Frequently Asked Questions (FAQs)

What is the difference between a 401 and a 403 error?

A 401 Unauthorized error means you haven’t authenticated yet — the server wants you to log in or provide credentials. A 403 Forbidden error means you are authenticated (or authentication isn’t the issue), but you simply don’t have permission to access the resource.

Is a 404 error bad for SEO?

A 404 error on a page that never existed or was always irrelevant isn’t harmful. However, if an important page with backlinks or traffic starts returning 404, it can hurt your rankings. Always use a 301 redirect when moving or deleting important content.

What causes a 500 Internal Server Error?

The 500 error is a broad catch-all. Common causes include syntax errors in server-side scripts, misconfigurations in .htaccess, database connection failures, memory limits being exceeded, or a failed deployment of new code. Check your server’s error logs for the specific cause.

Why does my browser show a 304 status code?

A 304 means your browser already has a cached copy of the resource that is still valid. The server is telling your browser to use that cached version rather than downloading the file again. This is actually a good thing — it speeds up page loading.

What is the difference between a 302 and 307 redirect?

Both are temporary redirects, but 307 explicitly requires that the HTTP method be preserved. A 302 technically should also preserve the method, but historically many browsers changed POST requests to GET when following a 302. The 307 code was introduced to ensure the method is strictly preserved.

How do I fix a 429 Too Many Requests error?

Implement exponential backoff — wait increasingly longer periods between retries (e.g., 1 second, then 2, then 4). Check the Retry-After response header if present, as it tells you exactly how long to wait. If you’re building an app, add proper rate limit handling logic from the start.

What does a 502 Bad Gateway mean for users?

For end users, it simply means the website is having trouble connecting its systems internally. The best course of action is to wait a few minutes and reload the page. If the issue persists, try clearing your browser cache or contacting the site owner.

Can I create custom HTTP status codes?

Technically you can return any three-digit number, but you should stick to registered status codes. Using unregistered or unofficial codes can confuse browsers, search engines, and monitoring tools. The IANA maintains the official registry of HTTP status codes.

What is the best redirect to use for SEO?

For permanent URL changes, always use a 301 redirect. It clearly communicates to search engines that the move is permanent and helps transfer link equity to the new URL. Avoid redirect chains (multiple hops) as they slow crawling and dilute link value.

How do I check what HTTP status code a URL returns?

You can use browser developer tools (press F12, go to the Network tab, and reload the page), online tools like httpstatus.io, or command-line tools like curl -I https://yoursite.com to view the response headers and status code.

Conclusion

HTTP status codes are the language servers and browsers use to communicate outcomes. Understanding what each code means — and more importantly, how to fix the problematic ones — puts you in control of your website’s health, performance, and SEO. Keep this guide bookmarked for whenever you run into an unfamiliar code, and remember: a 200 is always the goal, a 4xx means check your request, and a 5xx means check your server.

Similar Posts