Common Website Error Codes…And how to Fix Them


Website faults (known as HTTP error codes) may not mean much to the uninitiated, but they cause a great deal of frustration to your website visitors who will quickly leave for pastures new upon encountering them. Worse still, some of these website error codes can severely impact your SEO, thanks to broken links, slow pages, and lengthy redirect chains.

In many ways a website performs a lot like a car, taking you from point A to point B. However, as is the case with their four-wheeled counterparts, a website will experience faults from time to time. In some instances, these faults aren’t much more than advisories. However, in other circumstances, they can be a lot more serious.

Website faults (known as HTTP error codes) may not mean much to the uninitiated, but they cause a great deal of frustration to your website visitors who will quickly leave for pastures new upon encountering them. Worse still, some of these website error codes can severely impact your SEO, thanks to broken links, slow pages, and lengthy redirect chains.

Throughout this article, you’re going to learn what each website error code means and how to fix them accordingly so that they don’t have any detrimental effect on your website design or performance.

The Five Categories of Website Error Codes 

Before we get into the nitty-gritty of fixing the most common HTTP error codes, it’s useful to understand that they fall into five broad categories which are denoted with a number from one to five.

1XX Error Codes

Error codes beginning with the number one denote informational error codes. These usually pop up when a website has received a request from a user, but it’s taking longer than usual to process the response.

2XX Error Codes

Perhaps wrongly categorised as an “error”, website error codes beginning with a number two signal a successful response. If a user experiences a 2XX error code, it means their request has been received, accepted, and subsequently processed.

3XX Error Codes

Website error codes starting with a three refer to a redirection. The most common of which is a 301 code which redirects an old URL to a new destination. These most commonly pop up if you change the domain name of your website and need to redirect existing pages to new locations. This is almost always informational in nature, informing the user that the URL requested no longer exists and that they are being taken to the new location.

4XX Error Codes

The most common of website error codes, in many cases these refer to pages that no longer exist (404), and in plenty of instances, these can be fixed. The most common reason for these to appear is when a website moves to a new domain without redirecting the old URL. However, in other cases, it can be a result of a user not having the necessary permissions to view certain content.

5XX Error Codes

Server error codes indicate issues that are taking place on the backend of your website. They recognise that a user has submitted a valid request, but something has prevented the server from responding. These error messages are usually pretty significant as they indicate your website is not working correctly, however they are not always within your direct control.

The Most Common Website Error Codes…And How to Fix Them

The most common website error codes are contained with the 4XX and the 5XX category, which is why we’re going to focus on website error messages exclusively falling into those categories — starting with 400.

400 – Bad Request 

Error code 400 will appear when the request sent to the HTTP server had invalid syntax. This usually happens when a user types in the wrong URL into a browser’s address bar, but there could be other underlying causes.


  • A corrupted cookie file associated with the website in question could be the cause. Suggest to a user to clear the browser’s cache and cookie files and try again. If that works, you know this was the issue.
  • Suggest to a website visitor to double-check the spelling and formatting of the URL; typos are very easy to miss on first glance.
  • Request to try with a different browser, as it may be faulty.

401 – Unauthorised

This website error message is a little simpler to understand. A 401 error code means the URL requires authentication to gain access to the resource, usually in the form of a username and password. Sometimes a user doesn’t have that authentication, or they haven’t been authenticated correctly.

401 Error Code Solutions:

  • Provide a user with the username and password required to access the URL.
  • Ask the user to double-check their details to make sure it corresponds with the information you have in stored in the backend of your website.
  • Request that they clear the browser’s cache to ensure that data such as old logins aren’t corrupting the log in process.
  • If all credentials match, check with your hosting provider to make sure it’s not a server issue.

403 – Forbidden

Slightly different from a 401 error code, a 403 error code signals that a valid request was made, but the server is forbidden from carrying out the request, due to a lack of permission from the website administrator.

403 Error Code Solutions:

  • First, check that the user in question has been granted sufficient permissions to access the requested URL in the backend of your website. If not, go ahead and alter their permissions so that they can gain access.
  • Check the .htaccess file to ensure that it’s not denying access to specific IP address ranges.

404 – Page Not Found

Unfortunately, the 404 error code is the one that website visitors see the most. I say unfortunately because they signify that a user was looking for a piece of content on your website that no longer exists, causing visitors to exit your website. These errors also negatively impact your site’s SEO performance. Along with alt attributes, fixing 404 errors is one of the most overlooked factors when trying to improve a website’s SEO performance. Thus, if you come across any on your site, make to fix them as a matter of urgency.

404 Error Code Solutions:

  • First, check the obvious, did the user type in the wrong URL?
  • Does the content still exist? If so, find the new URL and submit a 301 redirect so that visitors typing in the old URL arrive at the new one.
  • If the content has been permanently deleted, install a redirect to another relevant page. If there’s nothing related, you can always redirect to the homepage.
  • Use Google Search Console to pick up any broken links and place a redirect on each old URL to new fully-functional URLs.
  • Customise your 404 error page. If you’ve got a big website, you may not pick up every single broken link or page. By installing a customised page, you can give directions that lessen the chance of losing the visitor altogether should they stumble upon a 404.
  • For broken links that originate from other websites, your best solution is to approach the website owner directly and ask them to replace the old URL with a new one.

500 – Internal Server Error

Perhaps second only to the 404 error message, this error code is just a generic error message that can cover a multitude of server issues for which another 5XX error would often better categorise.

500 Error Code Solutions:

  • Ask the user to user to refresh the browser. It could be the case that the server is too busy to process every request.
  • Troubleshoot through your website’s backend; there may be error messages waiting for you to take action.
  • Contact your hosting company to see if there are any issues with your server.
  • If the issue is capacity overload, you could ask a user to return later when demand isn’t so high.

502 – Bad Gateway

Often the real cause of a 500 error code, a 502 occurs when a user request was received but an internal server error has prevented the action from being completed. Once again, this website error message has several possible causes, and thus, the possible solutions reflect that fact.

502 Error Code Solutions:

  • Check live website visitor numbers; if they are well above normal usage, it could be that the server is overloaded and has crashed.
  • Ask the user to clear the cache of their browser. It could be full and preventing a successful request.
  • Check the server is up and running, it may be down for other reasons unbeknownst to you.
  • Contact your hosting provider to check that they aren’t any kill scripts in operation, terminating lengthy requests prematurely.

504 – Gateway Timeout

A 504 error code appears when the requesting server did not receive a timely response from the receiving server when attempting to load the page. In many instances, this is outside of your control, but there are still steps you can take should you visitors report such an error.


  • If you are on a WordPress site, check that the database hasn’t been corrupted in some way. Similarly, check the .htaccess file to make sure it’s not inadvertently blocking specific requests.
  • In most instances, you’ll need to contact your hosting company to see if there are any issues on their end.

Book Your Website for an MOT Today

Hopefully, now that I’ve explained what HTTP error codes are and how to take steps toward resolving them, you are in a much better position to troubleshoot those issues.

However, quite often, website owners have many broken links, corrupt databases, and missing permissions while remaining blissfully unaware. That’s why it pays to have someone equipped with the technical knowhow to take a look to make sure that these website error codes aren’t costing you ranking positions, website visitors, and ultimately sales.

If you feel like you are unsure of your website’s performance, we offer free website MOT testing to ensure that your website is working exactly how it should be. These no-obligation checks are delivered on a first-come-first-served basis, so make sure to speak to a member of our team to get yours booked in today.

1 thought on “Common Website Error Codes…And how to Fix Them”

Leave a Comment

Your email address will not be published. Required fields are marked *

Ali Dolphin is a UK-based marketing expert specialising in digital marketing. His expertise includes content writing, website design, and technology. Ali regularly provides insights and blogs on various aspects of digital marketing.

Scroll to Top