404 errors occur in all online stores.
And it’s OK.
New pages are added, old pages are removed. However, things go bad when the number of 404 errors becomes very high.
First of all, although 404 errors do not directly impact a store ranking on SERP, they consume already limited crawl budget (Crawl Budget). Thus, they bring you unnecessary losses.
Secondly, the only fact of a 404 error presence negatively influences customers’ impressions.
Imagine the situation: any user visits your store and gets a page with a 404 error. He/she does not obtain the required content and, consequently, starts hesitating. In most cases, he/she does not keep searching for the information on your store but rather prefers not to make any purchase.
Why do the 404 errors occur?
In the overwhelming majority of the cases, the reason for 404 errors is changed products or categories URL Keys.
Also, it often happens, that a store includes into its functional any extension for URL structure changing (for example, Layered Navigation with friendly URLs). Well, such a kind of extension update or removal can lead to the 404 error.
And last but not the least reason: a store was migrated to Magento 2 from another e-commerce platform (Prestashop, Shopify, Drupal, WooCommerce, etc) or from Magento 1. In this case, the search systems contain thousands (if not millions) pages with old URLs and giving a try to re-index, obtain a 404 error in response.
How to get the list of pages with 404 error
We considered possible reasons, but before start looking for the solution, we must find bearings of the issue. I.e. we must obtain the full list of your store 404 pages. It is possible in the following ways:
Get 404 pages from Google Search Console
Just open Google Search Console and visit the page Crawl > Crawl Errors > Not Found
Get 404 pages from Google Analytics
In Google Analytics, it is required to use parameter “404” and filter the list of all your store pages, as it is represented on the screenshot :
How to resolve 404 errors
Well, you have a full list of 404 error pages and now you have to redirect a user to new, relevant pages. There are several options available to solve this task:
- To set redirects for all pages manually
- To redirect a user to the search page
How to create 301 redirect
If you use Advanced SEO Suite, you can redirect users from a 404 page to a new page, by simply going to Marketing > Advanced SEO Suite > Redirects and adding a redirect there:
Also, you can import a .csv file with all the required redirects, using the inbuilt import option.
However, the main disadvantage of this approach is the necessity to create the list with old - new pages appropriateness. In case you have more than 1000 pages - it is much faster to set a redirect to the search page, and, for sure, in this way, you will cover all the 404 pages.
How to redirect 404 pages to search
This possibility is available in our Sphinx Search Ultimate and Elastic Search Ultimate extensions for Magento 2. To enable the option, simply go to the extension settings to Store / Configuration / Mirasvit Extensions / Search and activate the 404 to Search option.
Now the search will automatically display relevant results for all the 404 pages, in accordance with the requested URL.
Usually, 404 errors are present in an online store. It is normal and, can be said, natural. In addition, it is quite problematic to completely avoid them. However, if you know how to use the redirect option correctly you can support users’ interest, even if they visit a page with a 404 error.