A guide to website error codes

Camryn Smith

Apr 22, 2024 — 4 min read

You've probably seen a 404 or 500 error code when visiting a web page. We'll go over what the more common error codes are, what they mean and what you can do to fix them.

404 error code

If you’ve ever browsed online, you’ve likely seen an HTTP status code at one point or another. Does a 404 ‘page not found’ message seem familiar? This is an HTTP status code, and a common one at that.

There are different status codes to signify different errors, so you’ll know exactly what’s wrong when you see one – that is if you’re familiar with them! We’ll make sure you are by the end of this guide.

What are HTTP status codes?

HTTP status codes, or error codes, are responses from your web server to your browser request. Essentially, when you visit a website, your browser sends a request to that site’s server. Sometimes, these requests are fulfilled seamlessly, and other times, an error occurs. HTTP status codes are messages letting you know how things went and are useful in identifying the problem if a request has failed.

http status code classes

Status code classes

HTTP status codes are divided into different classes to help differentiate their meanings, and the first digit of the code indicates each class. These classes can help to identify the general nature of the status code before you determine what an individual code actually means. The five status code classes include:

  • 1xx – Any code starting with a 1 has to do with an informational response, or rather, the server is still processing the browser request.
  • 2xx – The 200-level status code class refers to a successful request. The browser request was successfully completed and the server gave the browser the expected response.
  • 3xx – This class entails a redirection code. Your request was received, but you got redirected to a different source.
  • 4xx – The 400-level status class refers to a client-side error. This means there was a problem on the website’s side of communication, and usually appears when a page is not valid or not found (like a 404 error).
  • 5xx – This is the status code class for server-side errors. The request was valid, but the server failed to complete it.

Now that you understand the status code classes, let’s go over some of the most common status codes that you may encounter.

Common status codes

Here are some of the most common status codes that you may have seen, what they mean and how you can troubleshoot them if they prevent you from reaching your desired web page:

200 – OK

This status code means everything is working as it should between the server and the browser.

301 – Permanent redirect

This code indicates a permanent redirect. When a page or resource has been permanently replaced with a different resource, any visitors or bots that land on this page will be redirected to the new URL.

302 – Temporary redirect

Similar to a 301, a 302 temporary redirect status code means visitors are passed along to a new page, but the new location is not permanent. There is also no troubleshooting necessary for this status code.

403 – Forbidden

The 403 forbidden error status code appears when a user tries to access a resource they do not have permission to view.

404 – Page not found

A 404 page not found error is a common status code indicating the page the browser is requesting was not found by the server. If you type in a URL that doesn’t exist, you’ll get a 404.

410 – Gone

A 410 means that a page is no longer available at all, and is more permanent than a 404.

500 – Internal server error

A 500 internal server error indicates a problem with the server. This means something went wrong on the server side and the request was not delivered.

502 – Bad gateway

A 502 bad gateway error means that there was a communication error between servers, like when a proxy server is in use.

503 – Service unavailable

A 503 service unavailable error indicates that the server is running properly, unlike a 500, but it is temporarily out of commission. This error is common when servers are undergoing maintenance or overloaded due to increased traffic.

List of all status codes

Explore over 60 different HTTP status codes under each class below.

1xx class status codes

2xx class status codes

3xx class status codes

4xx class status codes

5xx class status codes

Troubleshooting common HTTP status codes

If you get an HTTP status code, there are a few things you can do to try to fix it.

For a 403 forbidden code:

  • Double-check your URL
  • Clear your browser cache and cookies
  • Contact your internet service provider
  • Disable your VPN if you have one running

Learn more about troubleshooting a 403 forbidden error.

For a 404 page not found code:

  • Check your URL for typos
  • Refresh the page
  • Clear your browser cache
  • Contact the company, service or organization directly

Learn more about troubleshooting a 404 status code.

For a 500 internal server error code:

  • Clear your cache and browser history, then refresh the page
  • Give it some time and come back later
  • Contact the site owner

Learn more about troubleshooting a 500 internal server error.

For a 502 bad gateway code:

  • Start a new browsing session
  • Refresh the page
  • Restart your equipment
  • Change your DNS server
  • Contact the web administrator or your ISP

Learn more about troubleshooting a 502 bad gateway status code.

For a 503 service unavailable code:

  • Refresh the page
  • Restart your device
  • Give it some time
  • Contact the website owner or administrator

Learn more about troubleshooting a 503 service unavailable status code.

Best practices for handling HTTP status codes

If you have your own website, it’s imperative to understand and manage HTTP status codes to ensure a good user experience and performance.

HTTP status codes are important from the web admin side because they essentially tell you what is going wrong. A regular user may see an error and understand what it means at best, but a web developer or administrator has the power to choose appropriate status codes for certain situations and fix errors on their side of things. Aside from knowing what all of the codes mean, here are some other best practices if you are a website owner or developer:

  • Choose appropriate status codes
  • Use redirection codes appropriately
  • Keep sensitive data secure

HTTP status codes FAQs

What is an HTTP status code?

An HTTP status or error code is a message that a website’s server sends to a browser to indicate whether the request can be fulfilled. Think of an HTTP status code as a conversation between a server and browser. If something goes wrong, this code indicates the nature of the problem.

A 403 status code means access to the requested resource is forbidden to the user.

A 201 status code indicates that the request was successful and a resource was created.

If you are seeing a status code when trying to access a web page, you can try to clear your cache and browser history, refresh the page, restart your device or contact the website owner. Sometimes though, there is nothing you can do.

Camryn Smith

Written by:

Camryn Smith

Cammy is a writer with Allconnect, growing her broadband industry knowledge for over a year on the internet marketplace. Her expertise lies in home internet and broadband service with a focus on providers, plans… Read more

Robin Layton

Edited by:

Robin Layton

Editor, Broadband Content

Read bio