Common HTTP Status Codes/Errors and How to Solve Them: A Simple Guide for E-commerce Sites
Running an e-commerce site successfully takes a diverse skill set and the ability to adapt to problems as they arise.
That’s why it pays to have a little technical know-how, even if you’re not all that interested in web development or technical SEO.
Sooner or later, you’re bound to run into an HTTP Error, each of which has a unique status code attached which can tell you what went wrong and how to resolve it.
In this guide, we’re going to go over the most common ones, and how to resolve them, so you can keep your e-commerce site running in tip-top shape.
What is HTTP (Hypertext Transfer Protocol)?
To understand what an HTTP error is, we’ll need to quickly go over what HTTP is first.
HTTP stands for Hypertext Transfer Protocol, and while it may sound intimidating it’s really not that complicated.
If we think about what the internet is, at its core, it’s two computers sending data to one another.
HTTP is the basic “language” that the web browser on your computer uses to request data from a web server (a powerful computer used to host websites).
If we break down the phrase:
Hypertext is a form of text on the internet containing hyperlinks to other web pages.
A transfer protocol is just that, a protocol (set of rules) for transferring data over the internet, that tells the computers involved how to structure and interpret the data they send between one another.
5xx Status Codes “Server Errors”
HTTP status codes starting with “5”, or 5xx status codes, are server errors; they represent a request that was sent to the server (e.g. a request to view a web page), but the server was unable to fulfil (e.g. because the page couldn’t be loaded in time).
These can be considered among the worst or most urgent status codes because they represent a problem with your website’s hosting server.
Resolving 5xx Status Codes
When you set up your website, you more likely than not pay someone to host it for you on their servers, and this error code represents a problem on their end.
Therefore, you more likely than not won’t be able to resolve it yourself.
For most of these, your only real option is to contact your hosting provider and monitor the problem to see if they resolve it.
Here are the most common 5xx errors, and how to resolve them:
500 Internal Server Error
A “500 internal server error” means that something went wrong, but the server’s not exactly sure what.
It’s a generic error, that doesn’t really tell us a lot except that there might be a problem with your web hosting.
Since it’s so generic, it can be tricky to resolve if it’s a recurring problem.
A common solution is to treat it like a 504 error, as we’ll outline below, and see if using those fixes resolves the problem.
How to Resolve 500 Internal Server Error Status Codes:
If you see a lot of 500 internal errors on your site or a recent spike in errors, contact your web hosting provider and ask them to look into the issue.
If it’s a long-term problem, you may need to switch or upgrade your hosting package.
501 Not Implemented
A “501 not implemented” error means that some feature of the page you requested from the webserver is not supported by the webserver.
This is usually a feature that will be implemented in the future (which is where the name comes from) but which is not yet live on the website.
This is something you might see when in the process of upgrading your site, or when there’s a miscommunication between your web developer and your web hosting provider.
How to Resolve 501 Not Implemented Status Codes:
This is again not really something you can fix yourself.
You need to either alert your website host to the problem and make sure that all the required features are supported on their end, or contact your web developer to remove the problem features from the web pages if that was done in error.
502 Bad Gateway
The “502 bad gateway” error is a common sight across the web, that affects everyone from lone WordPress websites to huge corporations like Google and Twitter.
In today’s internet, the model of one computer communicating directly with another is actually largely outdated.
Instead, your computer will typically bounce off multiple servers to fetch something from the web, especially when you’re browsing internationally.
A 502 bad gateway error occurs when a server along the route receives an invalid response from another server “upstream”.
This means that the more complex the system is, the more chances there are of a 502 error (each additional server in the path is another potential failure point).
To get around this, websites often have multiple redundant routes you can take to access them across different server networks.
Despite this, sometimes failure is just unavoidable and that’s why we still can often see these errors today.
How to Resolve 502 Bad Gateway Status Codes:
This is once again an external issue, but there are a few things we can look into to try to determine the cause of frequent 502 errors.
Firstly, ask your hosting provider to look into your site’s DNS configuration.
DNS stands for Domain Name Server, and it refers to the system used to associate domain names humans use and understand (e.g. www.website.co.za) with the IP addresses that computers use to identify one another (e.g. 126.96.36.199).
An error in your DNS configuration can cause 502 errors because the server tries to contact the wrong IP address, stopping the request from being passed along properly.
Otherwise, ask your web host to see what else could be causing this on their end (if it’s a frequent problem), but don’t be too concerned if this infrequently happens to your website.
It’s perfectly normal, for now.
503 Service Unavailable
A “503 service unavailable” error is relatively simple.
It means that the server is either overloaded and unable to handle your request, or down for maintenance.
This is usually a temporary problem, if it persists there’s something majorly wrong with your web hosting.
How to Resolve 503 Service Unavailable Status Codes:
This is entirely a web hosting problem.
If it’s down for maintenance, all you can do is stay in contact with your web host about when they perform maintenance and try to schedule around when it works best for both of you.
If it’s a capacity issue, and your server is frequently overloaded, you need to either upgrade your package or switch providers to someone with more bandwidth capacity.
504 Gateway Timeout
A “504 gateway timeout” error is similar to a “502 bad gateway error” because it also tells us that an “upstream” server on route to the destination site has malfunctioned.
The difference is that a 502 error denotes a server that’s down, and a 504 error tells us the server is up but it didn’t respond fast enough.
In other words, a server upstream is too overloaded or slow to process our request to load the web page.
How to Resolve 504 Gateway Timeout Status Codes:
Similar to fixing a 502 error, you want to contact your web hosting provider and tell them to check for any errors in your site’s DNS configuration or firewall.
It’s also possible this error will pop up during your site’s regularly scheduled maintenance.
So, be sure to coordinate when the maintenance happens and prepare a page to inform customers what’s going on (rather than let them think the site is broken).
4xx Status Codes “Client Errors”
Error codes starting with 4, or “4xx” errors, indicate that the problem originates with the client (your web browser).
Some aspects of the request you’re sending through the browser are creating an error, which leaves the server unable to make good on the request to send you a web page.
This could be something as simple as an error in the syntax or requesting a page on the site that doesn’t exist.
Some of these codes can also denote urgent problems that need fixing on your site, such as when you move the URL address of a popular page and clients still try to access the old URL.
They can hurt your site’s overall health and SEO performance.
How to Resolve 4xx Status Codes:
Thankfully, most of the 4xx errors you’ll encounter will probably be issues you can solve yourself.
And if not you, your web developer almost certainly will.
A lot of the problems boil down to directing browsers to a different page on your site, that doesn’t return a client error.
400 Bad Request
A “400 bad request” code means that the server was unable to process the request your web browser sent through to it.
This can be caused by a variety of reasons, but the most common ones are:
- Using an URL with incorrect syntax e.g. “www.example.com/hmoe” instead of “www.example.com/home”
- The client is trying to upload a file that’s too large to the server
- The client is sending “deceptive routing information” (intentionally or not)
- Invalid or expired cookies coming from the user’s web browser
How to Resolve 400 Bad Request Status Codes:
As you may have noticed, this can be quite a tricky issue to resolve because there are so many potential causes.
If you or your clients are experiencing this error a lot, here are a few of the things you can look into as potential solutions:
- If the problem started after a recent update to your website, try rolling it back to an earlier version
- New extensions, addons or plugins can also cause issues sometimes, so look into those if you’re using a CMS like WordPress.
- Lastly, you can ask your web server host to look through their log files and try to find possible problems that may be causing the issue
A “401 unauthorised” error means that the web server received the request from the client, but it didn’t have the required authentication attached to access the requested page.
This can happen because of an error, or because the client is (knowingly or not) trying to access a restricted part of the website like its backend file directories.
Some websites also return 401 errors when a specific client, or incoming IP address, has been banned from accessing the site by the server.
How to Resolve 401 Unauthorised Status Codes:
If you or your clients are seeing a lot of 401 errors, you need to determine if the problem is with the pages they’re trying to access (user error) or some faulty configuration (a server error).
On the client’s side, you can try deleting your cookies and browser cache, double checking you do in fact have the correct URL or logging out and back in again.
These steps will all hopefully refresh your authentication credentials if you’re trying to access a page that you should have access to but you don’t any more.
Otherwise, contact your web developer and server host to see if there isn’t a faulty configuration listing the pages as private.
A “403 forbidden” error code may seem very similar to a 401 code, but it is different.
A 403 forbidden code means that your web client tried to access the server and decided you don’t have the required permissions.
Unlike a 401 error, there was no problem fetching the authentication data. The server looked at the provided data and decided you aren’t allowed to access the page in question.
This can again be for two reasons: firstly because it’s a page you don’t want just anybody accessing and secondly because there’s a faulty piece of configuration and pages that shouldn’t be restricted now are.
How to Resolve 403 Forbidden Status Codes:
On the client-side, the same solutions as a 401 solution still work.
Refresh your browser cache and cookies, try logging in and out again and double-check you have the correct URL.
If this isn’t a user error, you need to contact your web developer or hosting provider to fix the faulty configuration that’s causing your pages to become restricted.
404 Not Found
Perhaps the most infamous error on the list, a “404 not found” error indicates that no content was found at the requested URL.
Almost everybody who uses the web will encounter a 404 error at some point.
The most common causes of 404 errors are when people move web pages, or other content, to a different URL without updating their internal linking accordingly.
It can also be caused by a variety of other issues like trying to access an incorrect URL.
How to Resolve 404 Not Found Status Codes:
Most modern websites automatically redirect users away from 404 errors, so they’re becoming less and less common over time.
That being said, you still want to be careful when migrating your site or moving content to a different URL, to ensure you properly redirect all the previous pages to the correct destination.
Many SEO monitoring tools will also show you which URLs return URL errors, including those coming from other websites.
As we’ll cover below, a 301 redirect is a great way to bridge the gap between old and new web pages that require a new URL.
3xx Status Codes “Redirections”
Status codes starting with 3, or “3xx status codes”, are not actually errors unlike the 4xx and 5xx codes.
Instead, a 3xx code is simply an instruction for the web browser telling it that it should take another step and redirect the entered URL to another page.
They are used to manually bypass broken pages, or implement URL redirections (making a single page available from multiple URLs).
301 Moved Permanently / 301 Redirects
This is the only 301 code we’ll be covering, as it’ll be the most useful to you as a site owner.
A “301 moved permanently” code is something you can manually add to a URL, telling the browser to direct them to another web page instead.
They are especially useful for migrating pages between different URLs, such as when you want to update a piece of content and change the title, or when you’re moving your website to a new URL as part of a rebranding.
How to Do a 301 Moved Permanently Redirect
Most CMS plugins like WordPress and Shopify have plugins you can get to easily create 301 redirects.
To do this you simply download a required plugin (we recommend “301 Redirects – Easy Redirect Manager” for WordPress – not a sponsor) and input the old URL, along with where you want it to lead to now.
There is also a way to easily add 301 redirects if you have access to your website’s hosting server and can edit the .htaccess file. You can see how to do that here.
We hope this helped educate you about some of the most common HTTP status codes and errors you’ll encounter running an e-commerce site.
It’s always useful to know what an error actually means, and as you can see we can troubleshoot a lot of website problems with a little technical know-how.
If you enjoyed this article or found it helpful, check out more e-commerce marketing content on the inSyte blog or listen to the inSyte Podcast.
This article was brought to you by Syte.
We don’t develop websites (but we’re happy to recommend someone).
We are a specialist e-commerce digital marketing agency dedicated to driving up your bottom line.
If you need any help running your business’ digital marketing feel free to reach out with the form below or check out our case studies page to see what we’ve been able to do for our clients.