What Are HTTP Error Codes?
HTTP status codes are responses sent by a server when a browser (or any client) makes a request. They help indicate whether the request was successful or if something went wrong.
You ask: "Can I access this page?"
Server replies: "Yes (200 OK)" or "No, and here’s why (error code)."
Client-Side Errors (4xx)
404 Not Found
- URL may be misspelled
- Page was moved or deleted
- Broken link from another website
How to fix: Check the URL, go to the homepage, or search the site.
403 Forbidden
- No permission to access the resource
- IP blocked or restricted
- Missing login credentials
How to fix: Log in, check permissions, or contact the website owner.
401 Unauthorized
How to fix: Log in again or provide valid credentials.
405 Method Not Allowed
Example: sending POST to a page that only accepts GET.
How to fix: Check API documentation or correct request method in your code.
429 Too Many Requests
How to fix: Wait, reduce request frequency, or implement rate limiting.
Server-Side Errors (5xx)
500 Internal Server Error
- Bug in server code
- Database failure
- Misconfigured server
How to fix: Refresh, check logs (if developer), or contact support.
502 Bad Gateway
How to fix: Retry, check proxy or upstream server.
503 Service Unavailable
How to fix: Wait and try again later.
504 Gateway Timeout
How to fix: Retry or check network/server performance.
Network & DNS Related Issues
DNS_PROBE_FINISHED_NXDOMAIN
- Wrong domain name
- DNS server issues
How to fix: Check spelling, flush DNS cache, or change DNS (e.g., Google DNS).
ERR_CONNECTION_TIMED_OUT
How to fix: Check internet connection or try a different network.
Quick Debugging Checklist
- ✔ Check the URL carefully
- ✔ Refresh the page
- ✔ Try another browser
- ✔ Clear cache and cookies
- ✔ Check internet connection
- ✔ Verify login/authentication
- ✔ Retry later (for server-side errors)
Final Thoughts
Most HTTP errors are not random—they are clear signals from the server about what went wrong. Once you understand the pattern (4xx = client issue, 5xx = server issue), debugging becomes much faster and more logical.