Meet us at the IRX & eDX Expo: Learn more here

How To Redirect 404 Error Pages In Magento 2?

If you know anything about SEO, you’ll already know that having lots of 404 error pages on your website is a big no-no. 404 error pages negatively impact the user experience, and can even negatively impact your bounce rate. And when Google’s bots crawl your site, having an excessive number of 404 error pages can negatively impact your site’s reliability – and perhaps even your ranking.  

To prevent 404 pages from building up on your website, we’ve created this quick guide to help you redirect your error pages elsewhere and save your SERP score. Let’s dive in!

Why do 404 error pages occur?

Typically, a 404 error page occurs when you change a URL, or update your URL settings in one way or another, which creates a broken link. 

If you’re familiar with Magento, you’ll already know that there are lots of different options when it comes to customising your URLs, so 404 errors can occur easily. You can also inadvertently create error 404 pages when you move from one platform to another, or even when moving from Magento 1 to Magento 2. 

404 pages are pesky, but they’re not the end of the world – you can fix the problem by simply redirecting them elsewhere, such as to the site home page or the search page. You can also use extensions to redirect error pages to relevant on-site content.

Where can I find my error 404 pages?

If you want to be able to fix all your error 404 pages at the same time, you can go to Google Search Console > Crawl > Crawl Errors > Not Found, where you’ll be presented with a list of broken links on your website. It’s a good idea to check this every now and again to prevent broken links building up and hurting your SERP score.

Redirecting 404 error pages in Magento 2

If you want to redirect a 404 error page in Magento 2, you can do so manually (one by one) or redirect all pages to your search page at the same time. The option you choose depends largely on how many broken links and 404 pages you have on your site; if the figure is in the thousands, it’s not worth the time to redirect them all manually. 

To redirect a 404 error page, head to Marketing > Advanced SEO Suite > Redirects, and add a redirect to any error 404 page. You can redirect visitors to your home page, or, if you’re redirecting manually, to a relevant category page. 

The quickest way to fix all 404 error pages is to redirect them all automatically to the search page. This means you won’t need to constantly worry about checking and updating broken links.

Can’t I just change the links?

Yes and no. While it is technically possible for you to change a broken link, we wouldn’t advise you to do so: you might inadvertently end up ruining your backlink SEO campaign by creating another round of broken links. Backlinks are the backbone of any effective off-site SEO campaign, and if you suddenly change several URLs, you could end up with thousands of new error 404 pages on your website.

Before changing any links, it’s a good idea to speak to Magento SEO experts, who will be able to advise you on how to better deal with accumulating 404 error pages.

Should I customise my 404 error page?

Ever wondered why most companies present a humorous or whimsical error 404 page when you find yourself lost on their website? It’s simple – 404 error pages negatively impact the user experience. Who hasn’t been frustrated by finding themselves on an error 404 page after following a promising link? 

It’s a good idea to customise your 404 error page with something fun or cute – by injecting some humour into the moment, you’ll hopefully counteract any negative reactions from visitors who find themselves lost on your site.

The Bottom Line

The best way to deal with broken links and error 404 pages is to redirect them elsewhere; this helps you avoid ruining your link building campaign and helps prevent your site being penalised by Google’s crawlers. And if you do create a custom 404 error page, make it something fun!

Article by:

Joshua George is the founder of ClickSlice, an SEO Agency based in London, UK.

He has eight years of experience as an SEO Consultant and was recently hired by the UK government for SEO training. Joshua also owns the best-selling SEO course on Udemy, and has taught SEO to over 100,000 students.

His work has been featured in Forbes, Entrepreneur, AgencyAnalytics, Wix and lots more other reputable publications.