Have you ever heard of "HTTP 404 errors"?
Do you remember the day you were shopping online and when you clicked on a product, you were redirected to a page that displayed something like "404 page not found"?
The article will explain different types of 404 errors and how to correct them. These errors are detrimental to you as an online store manager, but they also prevent your customers from acquiring a product they wish to buy.
Therefore, this is a situation in which both the seller and the buyer miss out. This is why it is important to determine exactly what the 404 error is, and how to resolve it if it appears on your online store's website.
The next time you see this "HTTP error" appear, you will know how to fix it, because you will have the knowledge to find a quick solution and thus keep sales going on your site.
What is a "HTTP error 404"?
The HTTP error 404, or more commonly called "404 error", means that the page you are trying to open could not be found on the server.
This is a client-side incident which means either the page has been deleted or moved, and the URL has not been modified accordingly, or that you have misspelled the URL.
In other words, this means that there is no web page corresponding to the entered URL.
In addition to the 404 error, there are other similar errors, such as the 500 errors, which we have discussed in another article in this blog.
How can I recognize the 404 error on my online store's website?
This error message may appear in different ways on your computer.
Keep in mind that pages of this type can be completely modified by the domain's, which is also desirable because, in the event of an incident, we can offer our users an alternative so as to not abandon the website.
These messages may appear in different ways, but there are a few recurring words that will help you know if the accident occurred is one of them.
The error message may appear as follows:
- "Error 404"
- "404 not found"
- "The requested URL was not found on the server."
- "HTTP Error 404"
- "Error 404: page not found"
This message is usually displayed in black on a blank page.
Remember that the 404 error page can be fully customized.
PrestaShop offers a custom 404 page by default:
What steps should you take to resolve a HTTP 404 error?
Here are some simple tips you can follow to try to solve this problem on your own.
Later on, we will provide you with tips on how to carry out an advanced diagnosis.
In any case, you should first perform these initial checks, as such an anomaly can often be resolved rather quickly.
1) The first thing to do is to refresh the page. Press F5 to refresh the URL.
An error may have occurred if the page wasn't loaded correctly.
2) Clear the browser cache and delete cookies. If you are able to connect to the site via another device such as your mobile phone, clearing the cache and clearing cookies should easily solve the problem.
3) Check the URL and make sure it is spelled correctly.
Check spelling, hyphens, page extension, etc.
4) Remove malware: some malware can cause a 404 error to occur. It is imperative to make sure that your computer is protected and that it does not contain viruses.
5) Contact the site owner to report the 404 error. If you are the website owner, contact your web host and request further information.
An incident on the server may also be the cause of this 404 error.
Advanced diagnostics to correct HTTP 404 errors on your online store
For a PrestaShop store owner, as I mentioned earlier, such an anomaly can be frustrating.
We will now discuss the most common causes of this error, and how to correct it when it occurs in the administration panel or in the front office.
Many of these "common causes" are actually due to the .htaccess file.
I do not recommend using this type of file unless you are familiar with its features and have sufficient technical knowledge.
I suggest you contact your hosting service in order to contract a PrestaShop support plan.
Before you start using your administration panel and PrestaShop files, you must make a full backup of the database and its files.
Here are some checks to perform to resolve a 404 error:
1) Review the deleted pages
If you have deleted pages on your website, the search engines may have found and indexed it.
Worse still, your page may have been linked to another website. So it could be the access to this page via an incorrect link which caused the HTTP 404 error for the user.
Search engines may take a long time to recognize that a page has been deleted, depending on the crawl budget that they have allocated to your project.
Some users may also have saved the link to their favourites.
A good method is to redirect your deleted products to a different page, such as the home page, or the category page for the deleted product, in order to suggest similar products to your customers.
Every week, I decide to analyse all these errors on my own website using the Ahrefs tool, in order to detect possible contents that could present this type of anomaly.
You can do the same by going to "Backlink Profile > Broken":
In addition, with PrestaShop, you can perform your analysis with this addons' official redirection module, which does not require any changes to the .htaccess file code.
If you are faced with this type of incident, accompanied by a message such as "You are not authorized to access... ", then the error is probably related to an authorisation problem.
I recommend that you change the CHMOD of a file via an FTP command, or ask your host to make this change for you.
The best configuration of the permissions of your files/folders should be 755 for directories and 644 for files.
However, fees vary depending on the web host. You must therefore make sure you buy them in advance.
3) The memory limit
Errors can be due to an incident related to memory_limit on your hosting.
Although not directly related, it is important to know how to enable this "Error Notification".
I recommend that you enable this option, then reload the page containing the 404 error.
If a message such as "Fatal error: insufficient memory" appears, contact your web host to increase your available memory.
4) Problems with .htaccess files
This is a configuration file used by the Apache web server in the root directory which can, amongst other things, control redirections, protect your directories and rewrite URLs.
In many cases, 404 errors can be resolved by regenerating this file.
You can manually delete the .htaccess file via an FTP command and regenerate it in Control Panel > Advanced Settings > Performance.
In some cases, activating the "Friendly URL" option automatically regenerates the .htaccess file.
5) Incorrect SSL certificate configuration
If you install your SSL certificate, and your website has this anomaly, it means that the certificate has not been installed correctly.
Verify the configuration of the SSL certificate with your web host and ensure that the "SSL" version of the URL is connected to (or redirects to) the correct PrestaShop URL in the .htaccess file.
In PrestaShop 1.5.6+, you have the option to force the use of SSL for all pages.
In this case, you will need to confirm that any page called up in Iframe uses HTTPS.
6) URL rewriting mode (mod_rewrite) is disabled
This is an Apache module which allows you to customise your URLs (the "friendly URLs" or "user-friendly URLs").
If you get a 404 error after enabling them, you probably haven't enabled the URL rewriting mode ("mod_rewrite") on your server.
If your "friendly URLs" work, but, in "Control Panel > Advanced Settings > Performance”, you have an alert stating "The URL rewriting mode (mod_rewrite) is not enabled on your server, or it is impossible to verifiy its configuration",
then the problem is not due to the URL rewriting mode (mod_rewrite).
Some web hosts offer a higher level of security which does not allow PrestaShop to verify your server settings.
If your "friendly URLs" are working properly, it means that the URL rewriting mode (mod_rewrite) is installed correctly.
7) Incorrect "friendly URLs" path
An error can occur once you have created the path to your "friendly URLs" in “Administration Panel > Preferences > Referencing and URLs" (friendly URLs must be enabled).
In this case, it is possible that the "friendly URL" paths were not entered correctly.
Examples of custom HTTP 404 error pages in online shops
This is not a beginner's mistake. Indeed, all websites, online stores or other, may at some point present this type of problem.
As mentioned earlier, I recommend that you customise your error message, so that the person using your website does not abandon the page, disappointed that they did not find what they were looking for.
1) Le Slip Français
Here, the french online shop "Le Slip Français” gives you the possibility to return to the Men section or Women Section of the site to discover their products.
2) Ultra Secure
On the "Ultra Secure" online shop, the error page is not overly personalised, but presents users with a search engine, so they find products similar to the ones they were originally looking for.
To obtain further more information concerning the 404 error, it is always interesting to perform an error search on Google (by adding the word PrestaShop in your search to refine the results).
You will find a lot of information and dedicated tutorials.
Furthermore, you can consult the PrestaShop forum discussions gathered under the heading [RESOLVED].
With 500,000 community members, there will always be someone who is familiar with your problem and who can help you solve it.
If you follow these steps and suggestions, you should be able to diagnose most type 404 errors.
Whether you are a customer or an online retailer, it can be difficult to determine the cause or find the solution to an HTTP 404 error.