Wondering how to find and fix the 404 Page error?
When you surf the Internet, you may see a page with the status 404 Page Not Found. No matter if it is intentional or unintentional, it will cause a bad user experience for your site, leading to an SEO drop and fewer sales. In this blog, we will guide you on the way to locate & fix ’em in WordPress.
Table of Contents
What Is a 404 Page Error in WordPress?
404 Page Not Found is an HTTP status code that comes up with a notification about a page not existing. For instance:
- 404 Page not found
- 404 error – Page not found
- Or similar notifications.
Many site-related factors can take full responsibility for this 404 status code such as entering the wrong URL, changing the URL without proper redirecting, pages removed from the site, or domain name disappearance. Otherwise, the server malfunctions can cause the 404 error code, too.
Why Should You Track the 404 Page Error in WordPress?
Recently, Google has updated its algorithms and the new analytics system – Google Analytics 4. This big update changes the preference from clicks and traffic to user experience, which means the user experience will determine the SEO rankings mainly.
Then, you will understand what I mean here. 404 pages will affect your audience’s site experience like this:
- When they enter a 404 page, they will leave the site immediately, increasing your site’s bounce rate.
- Leaving the site soon also decreases the conversion rate and sales (which will be really harmful if your site is a business one).
- A 404 page will affect your site’s SEO rankings quite severely, how about multiple 404 pages at a time? If it’s a blog post, the effect will be less than a product page, obviously.
- How do you do to connect to other sites? Backlinks! If the backlinks on the page disappear, your domain authority will decrease and so do the Google keyword rankings.
How to Track & Redirect 404 Error Status Code Pages
There are many ways to find and fix a Page not found. Let’s roll out!
Track 404 Errors with Google Analytics 4
Google Analytics 4 or GA4, completely updated in June 2023, ends the working period of Google Universal Analytics. Offering a wider range of features for webmasters, GA4 can jump in and deal with many problems on-site. Of course, one of them is detecting 404 pages not found.
GA4 Engagement Reports
You can use the GA4 Reports section to find the 404 pages.
Step 1: Open the “Page & Screens” report in the Engagement section.
Step 2: Choose the option “Page title & screen class” as the main dimension.
Step 3: Choose the 2nd option “Page path & screen class”.
Step 4: Search and enter the title of 404 link pages.
It’s easy to work out, however, this method only shows up a list of pages that don’t exist but people still click on it. Also, it will take you lots of time to do this literally every day.
Google Search Console Pages Report
Google Search Console (GSC) will list all 404 links that Google bots detect on your website – both soft 404s & hard 404s.
Step 1: Log in to your site’s GSC, in the Indexing section, choose “Pages”.
Step 2: Scroll down a little bit, and you will see the section “Why pages aren’t indexed”. Choose “Not found (404)”.
Step 3: You will see all 404 links and then it’s all on you.
Online Broken Link Checkers
You can take advantage of online checkers to find 404 pages such as:
How to Redirect the 404 Pages in WordPress
Redirect to Your Home Page
Redirecting all 404 links to your homepage is the most convenient way to reduce bounce rate, increase time on site, and keep traffic on your site. If your site has 404 dead links, redirect the audience to the homepage with an explanation. Also, this will benefit you if you have inactive PPC ads on your homepage.
However, redirecting to the homepage may confuse the users when they try to access a specific page. Also, doing this will put a lot of commands on your server which will slow your site down a lot, especially big sites/brands. Moreover, Google will recognize the large number of 404s as “cheating” which affects your site’s overall search rating results.
To do it manually, you can access the WordPress theme folder /wp-content/themes/theme name/, look for the file PHP, and rename it to the 404.php file.
Next, make a new PHP file in Notepad and insert the below code:
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>
You will save it as PHP – All files, come back to the file /wp-content/themes/theme name/ to upload the new 404.php to the active theme folder.
Otherwise, you can use a WordPress plugin for redirection for this.
HTML Redirects
When entering a 404 page, you may get transferred to a new site after a short time. The notification will show some kind of “The site you access has been moved and you will be redirected shortly.”
It’s good for temporary purposes but it will be harmful in the long way. It will affect UX since they will stuck in a loop if they keep looking for that specific page. Also, this will require more redirects, which puts a heavy duty on your server.
301 Redirects
When you change the slugs, you might not redirect the current links to new ones, causing 404s. This may also happen when you change your site’s domain name or separate www & non-www versions of your website.
You can use 301 redirects for long-aged sites with great link juice. Both free and paid plugins will do this, but today we will dip into the 301 redirection tool in Rank Math.
Step 1: Access Rank Math SEO -> Redirections.
Step 2: Choose “Add New” and fill in all needed information.
Step 3: Choose “Add Redirection”.
With Rank Math, you can also access 302 & 307 redirection types or 410/451 maintenance codes. These are some of the most popular ways for you to redirect.
Some Other Ways to Fix 404 Page Errors
You can look up some other methods to fix this error:
- Restart your browsers
- Delete your browser’s cache
- Recheck your URL’s spelling
- Fix file permissions
- Disable and create a new .htaccess file
Conclusion
Status code 404 is a very common error that about 99.99% of all websites will meet, no matter how you perfect your site. However, you can avoid it as much as possible with our tips above.
Read more: 8+ WordPress FAQ Plugins for Creating a Self-Service Support Center
Contact US | ThimPress:
Website: https://thimpress.com/
Fanpage: https://www.facebook.com/ThimPress
YouTube: https://www.youtube.com/c/ThimPressDesign
Twitter (X): https://twitter.com/thimpress