Does your site have 404 errors?
Don’t worry, everyone’s site does, but that doesn’t mean you can ignore them. In this post, we’ll cover the following topics:
- What are 404 errors?
- How do 404s occur?
- What do 404s mean for your site?
- How to find 404 errors on your site
- How to fix 404 errors.
What is a 404 error?
“404 not found”. This is the error message you sometimes see on the web. So, what does it mean?
A 404 error simply means that a web page does not exist at the current URL.
Here’s how the 404 page looks on our site:
That’s all a 404 error means – there’s no web page at that URL.
But wait, I see a page that says there’s no page?
WordPress provides a special 404 template that can be customized like in the screenshot above. That is shown every time someone visits a URL where you haven’t published a post or page.
Providing a search bar and links to some of your most popular pages is a good way to make 404 errors less jarring for visitors.
How do 404s occur?
404 errors occur mostly through human error. For instance, someone might link to your site and spell a word wrong in the URL, like this:
Page on your site:
Not a page on your site:
WordPress is smart enough to automatically redirect these URLs sometimes, but often times this will lead to a 404. It doesn’t mean you did anything wrong or there is a problem with your site.
Here’s another example of how 404s can occur. Let’s say you publish a post at the following URL:
Later, you decide to shorten the URL to the following:
Now the old URL will produce a 404 error because the post no longer exists there.
Are 404s bad?
Yes, because a 404 means someone is visiting the wrong URL.
Consider the two examples above again. If someone misspells a link to your site, anyone clicking on that link will see a 404 error instead of your awesome post. You’re missing out on that traffic. Secondly, if you change the URL of a post, anyone who linked to the old URL is now leading people to a 404 on your site.
In short, a 404 typically means someone is seeing an error instead of your content.
How do I find 404s?
Luckily, there are lots of free tools available that will notify you of 404 errors as they occur on your site. The best of these is Google Webmaster Tools.
Google Webmaster Tools (GWT) includes a whole section for “crawl errors” which includes all the 404 errors on your site.
As you can see, I have plenty of errors to take care of. Most of these are only getting visited by bots not human visitors, so they aren’t urgent.
GWT is fantastic for finding the 404s currently on your site. Most of these errors are only being found by bots, but some are likely causing real visitors to miss out on your content.
While I like to use GWT, a decent alternative for finding 404 errors is the Broken Link Checker plugin.
How do I Fix 404s?
Fixing 404s is quite easy once you’ve found them. There are two things you can do.
First, you may have a link on your site leading to a page that doesn’t exist. In which case, simply update the link to another URL that does exist on your site.
Secondly, another site may be linking to a URL that doesn’t exist on your site. There are two things you can do in this situation. You can ask other webmasters to update their links to the new URL, or you can redirect the incorrect URL to the correct URL.
Here’s a tutorial on how to redirect URLs with WordPress.
404 errors are an inevitable issue on the web. Newer sites may not have many, but over the years as you modify and update your site, you’re bound to create a few.
With the tips above, you now know how 404s effect your site, how to find 404s, and how to fix them by updating links and redirecting pages.
If you have any questions about 404 errors, please post in the comments below.