What are 404 Errors and How Do They Affect WordPress?

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. For instance, I’m making up this URL right now: www.competethemes.com/cats-dogs-404s-oh-my.

Sounds like a fun page, but unfortunately, it doesn’t exist. I have never published a page on competethemes.com at that URL, and that’s why you see this 404 page if you visit it:

The 404 page on competethemes.com

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.

You can setup a custom 404 page with a plugin like 404page or Custom 404 Pro.

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: mysite.com/awesome-blog-post/

Not a page on your site: mysite.com/aewsome-blog-post/

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:

mysite.com/another-cool-and-awesome-blog-post/

Later, you decide to shorten the URL to the following:

mysite.com/another-awesome-post/

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.

crawl-error-report
Crawl report in Google Webmaster Tools

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.

Update links

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.

Redirect pages

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.

Conclusion

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.

Related Posts

3 Comments

  1. Pecetowicz Pecetowicz

    I have a lot of such errors.. 🙁 and all by the bug in the template. I’m trying to fix it.

    Thanks for Article.

  2. Todd Marchand Todd Marchand

    Hi, Ben.

    When I rebuilt my site recently in WordPress using the Ignite Plus theme, many URLs changed from “domain.com/directory/pagename.html” to “domain.com/pagename/”.

    Consequently, search results that lead to pages indexed from the old site take visitors to the 404 page, which announces:

    404: Page Not Found

    Looks like nothing was found on this url. Double-check that the url is correct or try the search form below to find what you were looking for.

    [search form]

    Question: Should I set up redirects for the 90+ pages that have changed, or may I simply edit the 404 page to make it a little friendlier and more useful? What are the pros and cons of redirecting visitors vs. keeping the 404 page with some more friendly language and a handful of useful links? And how would I edit the 404 page?

    • Ben Sibley Ben Sibley

      Hi Todd,

      I think redirecting would be a much more user-friendly solution. Visitors won’t even know they are being redirected and it will be just like visiting the original page. It’s also better for SEO-purposes.

      You won’t need to enter in 90 separate entries. You can use a “regular expression” or “regex” to write a pattern that will redirect all “.html” variations to non .html versions.

Post a comment

Your email address will not be published. Required fields are marked *