
404 errors occur in all online stores.
And that’s OK.
New pages are added, old pages are removed. However, things can go south when the number of 404 errors becomes very high.
First of all, although 404 errors do not directly impact a store's ranking on SERP, they pull from an already-limited crawl budget (Crawl Budget) which means they bring you unnecessary losses.
Secondly, just the appearance of a 404 error can negatively influence customers’ impressions.
Imagine this situation: a random user visits your store and is presented with a 404 error page. He or she does not obtain the required content and starts to doubt whether your store page is actually worth browsing. In most cases, he or she does not keep searching for information on your store and definitely does not make a purchase.
Why do 404 errors occur?
In the overwhelming majority of cases, the reason for a 404 error is a change in products or categories URL Keys.
Also, it often happens that a store includes into its functional an extension for URL structure changing (for example, Layered Navigation with friendly URLs). Needless to say, this type of extension update or removal can lead to a 404 error.
And last but not least is the following reason for error: 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) of pages with old URLs, and when trying to re-index, end up obtaining a 404 error in response.
How to get a list of pages with a 404 error
We considered possible reasons, but before we start looking for a solution, we must obtain a full list of your store 404 pages. This 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 the parameter “404” and filter the list of all your store pages, as 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 users 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 a list with coinciding old and new pages. If you have more than 1000 pages - it is much faster to set a redirect to the search page, which will ensure that you cover all 404 pages.
How to redirect 404 pages to search
This opportunity 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 Store / Configuration / Mirasvit Extensions / Search and activate the 404 to Search option.
Now the search will automatically display relevant results for all 404 pages in accordance with the requested URL.
Conclusion
404 errors are a routine presence in online stores. It is normal and, in a sense, natural. In addition, it is quite costly and problematic to seek 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.