If your WordPress website users encounter a 404 page, there are two factors to consider when redirecting them.
Many WordPress developers are focused on eliminating the 404 pages because website owners know that many users will leave immediately to check out other sites.
So, the first reaction is to keep them on our site by redirecting them to our homepage. However, redirecting a 404 to the homepage operation needs to be considered carefully.
This is because many websites design custom-designed 404 pages and do not redirect their users. Instead, they prefer to give visitors something nicer to look at.
People are accustomed to seeing 404 pages because an e-commerce site has thousands of pages and it’s impossible to avoid tens or even hundreds of 404 error messages. Products pages are left unattended and long after the shop stopped selling the product the page remains online but no longer exists.
This situation is not ideal; the user does not enjoy the experience and SEO is negatively affected. What you can do is to run a site audit by SE Ranking or take a quick SEO test online by Sitechecker to see what is not working properly.
404 pages can provide a little bit of information for visitors to your site.
Nevertheless, most visitors will wonder why they are seeing a 404 page and they may well be potential clients/customers!
I'm interrupting the article to tell you about BeTheme, the definitive multipurpose theme. If trying to satisfy multiple clients has become more stressful than rewarding, BeTheme is the solution for that.
BeTheme’s selection of hundreds of customizable, responsive pre-built websites is the highlight and a proven stress reducer.
The customizability of the theme makes it a dream come true for its users. There are 4 types of Page Builders that you can use with it: WPBakery, BeBuilder, and Elementor among them.
And now with the Live Builder, it’s even more impressive.
Check out BeTheme and see why our users love it!
The rest of the article is down below.
For blogs, portfolios, and other more specific content, it’s advisable to handle the related 404 pages one by one, so they can be redirected fittingly. If we have simply moved a blog post, users need only to be guided to the new location. The same applies to broken and old URLs.
Install and activate a Redirection plugin to do this one-by-one operation.
If there are many pages showing the 404 error on our website it is best to redirect them all to our homepage rather than lose traffic.
This is how to redirect all 404 pages to our homepage: Manually or via a redirection plugin
<?php header("HTTP/1.1 301 Moved Permanently"); header("Location: ".get_bloginfo('url')); exit(); ?>
To install a redirection plugin:
Tip: To test the redirection plugin, type a made-up URL into the browser, which should redirect to the website homepage.
404 errors are common and most users know that web pages undergo changes and are not perfect.
However, if the 404 errors are causing customer dissatisfaction, especially with pages that attract high traffic, then redirecting users to comparable content, through links on the homepage, is the best recommendation.
Redirect 404 to homepage in two ways:
If you enjoyed reading this article on how to redirect 404 to homepage, you should check out this one about how to use toolset.
We also wrote about a few related subjects like how to downgrade WordPress, how to install google tag manager on WordPress, how to embed a google form in WordPress, WordPress memory limit, how to see the current WordPress version and how to change the author in WordPress.