HTTP response status codes are three-digit numbers sent from a server to your browser to indicate the result of a request. While these codes help developers and website administrators diagnose issues, they can be puzzling for everyday users. This guide breaks down the most common HTTP status codes and their meanings.
How Status Codes Are Categorised
Status codes are divided into five groups, based on their purpose. The first digit of the code determines its category:
- 1xx (Informational): The request has been received, and the server is continuing to process it.
- 2xx (Success): The request was successfully received, understood, and fulfilled.
- 3xx (Redirection): Further action is needed, such as following a new URL to complete the request.
- 4xx (Client Errors): There’s a problem with the request sent by the user or browser.
- 5xx (Server Errors): The server failed to handle the request due to an internal issue.
Common HTTP Status Codes Explained
200: OK
The request was successful, and the server delivered the expected content. This code is returned when a webpage or resource loads correctly.
301: Moved Permanently
The requested page has been permanently redirected to a new URL. Browsers are usually sent automatically to the updated address.
403: Forbidden
The server refuses to grant access to the resource, often due to insufficient permissions.
404: Not Found
The server cannot locate the requested page. This usually happens if the page has been deleted, the URL is mistyped, or the resource no longer exists.
500: Internal Server Error
A generic error message indicating the server encountered an unexpected problem. This often needs fixing by the website administrator.
503: Service Unavailable
The server is temporarily offline, often due to maintenance or high traffic. This is typically a short-term issue.
Why Are These Codes Useful?
Understanding these codes helps users and website owners:
- Identify the source of a problem (e.g., a broken link causing a 404 error).
- Resolve issues faster, such as adjusting permissions for a 403 error or addressing server problems for a 500 error.
- Enhance the user experience by fixing errors promptly or creating user-friendly error pages.
Practical Examples for Troubleshooting
Understanding these codes becomes even more useful when applied to real-world scenarios. Here’s how they might appear and what to do:
- 404 Not Found
Example: On WordPress, a 404 error could mean a page was deleted, the URL is mistyped, or you might need to re-save permalinks (Settings > Permalinks > Save Changes) to refresh the site’s URL structure. - 403 Forbidden
Example: A 403 error occurs when a server refuses access to a resource. Common causes include incorrect file permissions (e.g., files needing 644 or folders requiring 755 permissions), security rules in.htaccess
(e.g.,Require all denied
), or firewalls/plugins blocking requests. - 500 Internal Server Error
Example: A WordPress site throwing a 500 error? Often caused by a faulty plugin. Enable debug mode inwp-config.php
to identify the culprit. - 301 Moved Permanently
Example: Migrated your site from HTTP to HTTPS? Use 301 redirects in your server config or.htaccess
to ensure old links point to the secure version. - 503 Service Unavailable
Example: A sudden traffic spike crashed your site? Temporarily enable a maintenance mode plugin or scale server resources. For recurring issues, consider a CDN like Cloudflare.
Final Tip: Customise error pages (e.g., a friendly 404 message with links to popular pages) to keep users engaged even when things go wrong.
By linking these codes to real fixes, you can quickly diagnose issues, reduce downtime, and improve your site’s reliability.