08/02/202217 min

What is an “Error 404 not found” and how to fix it on your online store?

404 errors are common, and we have probably all encountered one before while browsing the web. But what exactly is a 404 error? What are the reasons you are getting a 404 page? And why do 404 errors matter for your SEO? All these questions and many more are answered in the following.

What is a 404 error?

A HTTP 404 error is one of the most common errors on the web. The error is also known as “404 Page Not Found”. It indicates that the page you are looking for cannot be found. Usually it will mean that the page is deleted or has been moved. It can mean that the link is broken or that it does not lead to a valid website or page. To explain it more in-depth it means that what is happening is that when you are going to a specific page, your browser is asking that specific website to display something. If the website cannot find the right page to display, it will give an error instead.

A 404 page is definitely not a good thing for a website. It is bad for the user experience, and frequency incidences of users being redirected to 404 error pages can lead to the categorization of a website being “untrustworthy” or “low-quality”. This categorization is made by Google’s algorithms.

Because of the 404 error being so frequent on the internet and therefore one of the most well-known errors on the web, it has ended up becoming a meme and a slang term. For instance, if you refer to someone as “having a 404 error”, it usually means that they are ignorant about a particular topic or maybe even slow to think.

404 not found
 

Reasons why you're getting a 404 page error

A user can run into a 404 page in a great variety of ways. For example, it can happen if the user follows a link on a website, and the link leads to a 404 error message. It can also happen if the user has a bookmark that leads to a dead-end. We will explain five reasons why you may be getting a 404 page:
 

  • The page is moved: If a page has been moved, it is possible that the page has been placed in the wrong folder. If this happens, you might have to check the pathway to the page and compare it against your file transfer protocol (FTP) service or content management system (CMS). If you see that the page is placed in the wrong location, you need to move it to the proper location and then try to access it from your browser again. If that does not help, you might need to talk to your website host and let them help you.
     
  • The page’s directory has been moved: Sometimes moving the page’s containing folder - the directory - the URL for every single page in that folder will change as well. This means that you will need to access every page by its new URL. Moreover, the names of each folder in your URL should match what’s in your CMS or your FTP service.
     
  • The whole site has been moved: If an entire site has been moved/rehosted, you might encounter an HTTP 404 error while the site readjusts to its new place. If this happens, you can either wait for it to fix itself - the website should not be down for more than a couple of minutes after moving it - or you can get in contact with your new website host. They should be able to tell you more or less how long it will take before your website is ready.
     
  • 301 redirects have been forgotten: If a page or a whole site recently has been moved, it is possible that proper 301 redirects have not been put in place. A 301 redirect tells the user that a page has permanently moved to a new URL. Moreover, it tells search engines that you do not lose any rankings for valuable search terms, but you are still free to customize your website the way you want it. If you want an old URL to redirect users to the same page with a different address, you have to implement a 301 redirect on that page.
     
  • The URL has been mistyped: This reason is the simplest and before you start worrying about what the reason for the 404 page must be, it is a good idea to check the spelling in your URL. A simple error like that can cause the user to end up with an HTTP 404 error.
    Any non-existing URL on a webpage will usually lead to a 404 page. Not because the URL is broken, but simply because it doesn't exist.
     
  • You have deleted a product, category, or a page:  If you delete a page, for example a product page or a category page, then you will encounter a 404 page if you access the link. This is the most common reason why you would face a 404 error on your PrestaShop.

 

Why fixing 404 errors matter for your SEO

So, how does 404 pages matter for your SEO? Well, 404 pages have an impact on rankings. If a page returns a 404 error, it means that the link does not exist. This also means that Google and other search engines will not index it (eventually). According to Google, 404 errors are a completely normal part of the web. They are normal because the web is always changing; new content is made and old content gets outdated and Google has 404 errors themselves. However, there is no way around that 404 pages are not good for your SEO.

Google and other search engines favor new and fresh content in their algorithms. Therefore, if you have a lot of HTTP 404 errors on your website, it is automatically a sign that your website content is old and outdated. To make a long story short, it tells search engines that you are not looking after your website and this will end up harming your SEO rankings. Needless to say, no one can avoid 404 pages. So don’t be worried if you have some. The most important thing is to regularly check and fix them.

Furthermore, the 404 error not found is not very popular among website owners because it can mess up a user’s online experience. The error can be frustrating for users because they do not reach the page they wanted to. This can result in bad user experience. However, as a website owner, you can make sure that the 404 error page includes links that, for instance, lead to your home page, one of your popular blog posts, one of your website’s popular products, the contact page, or maybe even a way for users to report a broken link.

 

Difference between a 404 error and a broken link

So, are 404s and broken links the same thing? Not entirely. If a link is broken because the URL has changed location then, yes, the 404 error is hence a broken link. What is happening, in this instance, is that the user is requesting something from the server that no longer exists. It is defined as broken because something previously existed on that specific page/link.

A broken link needs to point to a page with any 4XX client error or 5XX server error in order to be classified as broken. Therefore, broken links are not always exclusively due to 404 errors.

 

How To Fix 404 Pages (Broken Links) On Your PrestaShop

For a PrestaShop store owner, a 404 error can be frustrating. Therefore, 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.

It is very important to mention that there are two practices of fixing a broken link that directs to a 404 page error. Say there is a broken link in one of your category pages. The link is: yourwebsite.com/nike-air-one and the link doesn't work. The working link is: yourwebsite.com/nike-air-force-one

So what do you do?
 

  • Bad practice: You leave the broken link like it is, and then you redirect /nike-air-one to /nike-air-force-one the page with error to a new page (for example the new page).
     
  • Good practice: You fix the broken link on the given page and replace it with the new link and at the same time you also redirect the broken link to the new link.

The endresult for the user but the difference is that the broken link will still exist on your page, if you do it the bad-practice way.

Apart from that, 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. 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 how many times the search engine crawler visits your website. Nowadays, Google’s crawler bots will at minimum visit your website once or twice per week if not more.

In order to fix your 404 pages, you would need to know where they are. You can find many online crawlers that can crawl your whole website and scan for any broken links. Tools like Screaming Frog, Ahrefs, Seemrush are all tools that can help with that. You can google “404 checker” that scans your site for free (limited number of pages) and gives you a list of the 404 pages and broken links that exist on your webshop.

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.

You can analyze all these errors with a tool (paid) called Ahrefs in order to detect possible contents that could present this type of anomaly.

Ahrefs can perform a Health Score Check on the website. After the check is done, Ahrefs will tell you the amount of 404 pages and how many broken links it found.

ahrefs dashboard

Then, you can see the whole list of 404 pages and on which page the broken links were found.

404 list from Ahrefs Health Score

Image: 404 list from Ahrefs Health Score giving a list of 404 pages on novasolar-service.dk

In addition, with PrestaShop, you can perform your analysis with a redirection module from PrestaShop Addons, which does not require any technical knowledge.

Eventually, if you keep going on and fix your 404 errors, the list will be empty and you won’t have any broken links.

 

2) Permissions

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 authorization problem.

We recommend that you change the CHMOD of the files 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.

 

3) 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 on your FTP. The .htaccess is located in the root of your installation directory.

htaccess

 

If you’re on Filezilla, right-click on the “.htaccess” file, and click “Delete”. After the file is deleted, simply open your website, and the .htaccess file will generate automatically again.

A safer way would be to just rename the .htaccess file to for example “.htaccess_old”. That would work as a backup as well, in case anything should go wrong and the .htaccess file regenerates in a wrong way.

Another less technical alternative is to just save the settings of the “SEO & URLs” page on your PrestaShop back office. This action also automatically regenerates the .htaccess file.

Click on Shop Parameters and then “Traffic & SEO”. Scroll down to the bottom and hit the “Save” button.

settings seo urls page on prestashop backoffice

 

4) URL rewriting mode (mod_rewrite) is disabled

This is an Apache module that allows you to customize 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, inside "Shop Parameters >Traffic & SEO”, you have an alert stating "The URL rewriting mode (mod_rewrite) is not enabled on your server, or it is impossible to verify 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. However, if your "friendly URLs" are working properly, it means that the URL rewriting mode (mod_rewrite) is installed correctly.

 

5) Incorrect schema of URL’s

If you by mistake have changed the schema of your URL’s “Shop Parameters >Traffic & SEO" (friendly URLs must be enabled), then it will cause mass 404 errors on many of your pages. In this case, it is possible that the "friendly URL" paths were not entered correctly.

If you’re not using any modules that make your URLs pretty, then you can follow the default schema.

The default schema as of PrestaShop 1.7.x looks like:

schema_schema prestashop

Route to products. {category:/}{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html

Route to category: {id}-{rewrite}

Route to category selected_filter: {id}-{rewrite}{/:selected_filters}

Route to supplier: supplier/{id}-{rewrite}

Route to brand: brand/{id}-{rewrite}

Route to page: content/{id}-{rewrite}

Route to page category: content/category/{id}-{rewrite}

Route to modules: module/{module}{/:controller}

But beware, changing the schema path can affect your site drastically, and eventually, you will end up creating lots of broken links if you are not aware of what you’re doing. In this case, consult professional help.

 

6) Automatically redirect 404 error pages to homepage

This is usually not seen as best-practice at all, but if you’re facing a lot of 404 pages, it might be the fastest way for you to avoid your many 404 pages in the search results. Apache provides ErrorDocument directive to help you catch all types of error responses.

If you are uncomfortable with files and server directories, then you can head over to PrestaShop Addons where you will find lots of modules that can do the above mentioned solution.

 

Making Your “404 not found page” look nice

As mentioned earlier, we recommend that you customize 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.

dahlsgravering - 404 page - example

Source: dahlsgravering.dk

Here, the Danish shop Dahls Gravering has a simple, yet useful 404 page that allows you to search for products. (PS: The search bar is also a default feature on PrestaShop 404 pages). There is also a button that links to their most popular category.

le slip francais 404 page example

Source: leslipfrancais.co.uk/

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.

novasolar - 404 page - example

Source: novasolar.dk

Novasolar.dk has a simple 404 page. The page has 4 helpful links. They link to their homepage, their sales page, their heating calculator page and their FAQ page.

The most important with customizing the 404 page, is to make sure the page doesn't look “scary”. Inexperienced users could easily misunderstand it as virus or malware.

Here is a 404 page we surely all remember :-)

404 page - old example - Internet Explorer

 

Don't worry, 404 errors are inevitable

404 errors are inevitable. They will appear on your site. A broken link that gives a 404 page is not a beginner's mistake. Indeed, all websites, online stores or other, may at some point present this type of problem.

We recommend that you frequently perform 404 page checkups on your website. Usually, if you’ve hired a SEO agency or specialist, checking up on 404 pages would be one of their responsibilities.

404 is the error most users are familiar with, but it isn’t the only one. Other errors from the 4XX family include 400 Bad Requests, 301 Unauthorized, 403 Forbidden and 408 Request Timeout.

Every 2 weeks, get the best ecommerce tips and latest trends in your inbox.

By submitting this form, I agree to the data entered being used by PrestaShop S.A for sending newsletters and promotional offers. You can unsubscribe at any time by using the link in the emails sent to you. Learn more about managing your data and rights.