-What is Error 404? -Why does the 404 Error page happen in the first place? -How to try our best to avoid 404s -How 404 pages can hurt your SEO -Different ways to track 404 pages using 404.php template and Google Analytics and Google Search Console. -What to do after finding 404 pages in WordPress -Last but not least, create better 404 pages in WordPress
“Error 404”
“404 Not Found”
“HTTP Error 404”
“Not Found”
“Page Not Found”
“The requested URL was not found on this server.”
“The page cannot be found”
Website Maintenance
Marketing and SEO
Both
My Answer: Both
Text
404 pages happens when a non existing URL is requested from the webserver, due to different reasons. Either a wrong URL is used or the page is actually deleted. Some Examples why URLs change, content is updated and deleted.
-Human Errors -Branding Changes -Organizational needs -SEO needs -Indecisiveness -Outdated content and relevance
Text
Human Errors
Try to avoid mistakes.
Do a thorough check content, title, URLs. Run it by everyone before hitting publish. Use tools to check the grammar, content and title of your content. [Grammarly, Yoast etc]
Broken links from 3rd party websites.
Try to contact them and let them know the correct link. [Use WP Plugin - Broken Link checker]
Text
Outdatedness
Plan more evergreen content.
Jumping in to the trend will bring you more traffic but sometimes it can also backfire.
Try to build content that can live on the website for forever, or at least a long time.
Text
Rebranding and Irrelavant content
Brand guidelines change and content becomes irrelavant time to time.
Try and avoid such situations in the best possible way.
Some good examples of branding changes due to usage of controversial images and names.
Text
Regularly check for broken links on the website
When you delete content remember to do a complete check of internal links and external links to the page you delete. Update the URL on your own website to new URLs. If you have link backs from third party make sure to notify them of the change.
And if the old page was indexed, has visitors, has external links, make sure you do a 301 redirect. If none of those happen, then let it 404.
If you find broken links on your website, that are due to 404s on other people’s websites make sure to change that.
Plugin: Broken Link Checker
Text
404 itself doesn't hurt your SEO, but indirectly it does.
Google doesn’t index 404 pages. If a page returns 404 a few times, Google thinks that this page does not exist. Perfect! Good for me!
You see it’s the density and the frequency of 404 pages. 404 pages are broken links and when a user clicks on a 404 page, most users tend to just exit the site within a few seconds of landing on your website. This decreases your user retention time, time spent on page and increases bounce rate. This gives you negative points/hurts your cerdibility for SEO and hence 404s can be bad if the situation is not handled properly.
Text
Use a WordPress plugin to check broken links https://en-ca.wordpress.org/plugins/broken-link-checker/
There are several good plugins, but this is the one I use. I have also used SEMRush which is a premium SEO tool and it also gives you a list of 404 pages, with several other features.
Text
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
/* Standard Analytics Code */
ga('create', 'UA-XXXXX-YY', 'domain.com');
ga('send', 'pageview');
/* Track 404 Errors */
var url = "/404/?url=" + window.location.pathname + window.location.search + "&from=" + document.referrer;
ga('send', 'pageview', url);
</script>
Step 1
Replace the below script with your GA standard code and add this script to 404.php.
Text
Step 2 Go to google analytics Behaviour -> Site content -> all pages and use the search feature in the filter and type 404.
Text
Text
Check if the page is indexed on google. Check if the URL has any traffic. Check for internal and external backlinks. If these things happen: You can do a 301 redirect to a relevant page. Otherwise,
You can let the page be 404 page and it will die out eventually. Different ways to do 301 redirects [Google different ways to do this and use the one you're most comfortable with]
-Update .htaccess manually
-Use a redirect plugin
-Use Yoast SEO paid plugin
Text
If the URLs leading to 404 pages are significant to your website. It’s important to redirect your visitors to a relevant page. If you don’t want your users to go empty handed and don’t want to lose traffic, provide users with some helpful information.
Text
Here are a few tips to build a better 404 page.
Clearly state that the page they are looking for does not exist.
Add a search box
Keep the branding and content of the page consistent to rest of the site
Add a sorry note, or something funny, something personal etc
Provide them with your highly valuable pieces of content on the 404 page
These are some suggestion for better 404 pages, but I am sure you’ll find a lot more examples on this topic.
Text
Text
Different plugins to deal with 404 pages and create 404 pages.
https://en-ca.wordpress.org/plugins/404page/
https://wordpress.org/plugins/custom-404-pro/
https://wordpress.org/plugins/404-solution/
https://wordpress.org/plugins/wp-404-auto-redirect-to-similar-post/
Here is a 404.php template to start with https://www.labnol.org/code/19934-404-page-for-wordpress
Text
Auhtor: Neha Patel Email: neha@web247.solutions