404 Error

Managing 404 Errors in WordPress

Share this:

Why You Should Manage Your 404s

Any errors on your website can cause serious problems both for visitors and your SEO.  If the first experience a visitor has with your website is a 404 page, they are very likely to bounce off to another website for the information or services they need, instead of looking for the page on your site.   I know when I follow a link from Google and hit a 404 error, I immediately hit the back button and check the next result on the page.  Visitors who are already on your site and follow one of your internal links to a 404 are more likely to have a negative opinion of your site, just like you would feel less secure about shopping in a store with a broken staircase.

In addition to discouraging visitors, 404s hurt your site’s SEO.  Search engines penalize websites that give them 404 errors, or pages that look like they’re otherwise “under construction.”  Google (appropriately) believes that searchers are looking for reliable websites that have relevant information, not placeholders or sites that are not being maintained and kept up to date, so any site with lots of broken links sends a signal that your site should be lower in the results.  Getting rid of as many of those errors as possible will help reduce your ranking penalties, and significantly improve the visitor experience.

What is a 404?

Lets start off with an explanation of 404 errors. When your website shows someone a 404 page its because they have attempted to visit a page or file on your site that doesn’t exist.  Sometimes its a problem with your website, such as a link on your site that is taking them to this page and causing the 404.  A lot of the time it is actually not anything you did, and instead its caused by a link from another website or an automated system scanning websites.  One thing is constant, no matter how the user got to the 404 page, you need to figure it out and deal with it.  Here’s what the default 404 page from an Apache server looks like:

Apache 404 Page

Most good content management software like WordPress comes with support for custom 404 pages. Replacing the default Apache 404 page is important for many reasons.  The default page is unformatted, and gives the user the impression that a terrible problem has occurred.  It’s important to remember that many of your visitors are not particularly familiar with the different errors that a website can produce, and may not be able to tell the difference between a trivial 404 error caused by a typo and a more serious error like a 503 gateway error or 500 server error.

Making a friendly 404 page that matches the look and feel of the rest of your website immediately communicates the fact that the website itself is still functioning, and casual language can help put your visitors at ease.  You can also take the opportunity to suggest working pages that they may have been looking for based on the url, which reduces your 404 bounce rate.  You can get an example of that by viewing our 404 page here at Local SEO Company: www.localseocompany.net/non_existant_page.  You will notice that the URL for non_existant_page isnt a link, I dont want to create another 404 for Google to see.  You will have to copy and paste it into your browser.

Local SEO Company 404 Page

(click to enlarge)

I won’t go too deeply into how you actually create a custom 404 page in WordPress.  Most good themes have this functionality built in with easy methods to customize the page.  If your theme doesn’t already have a 404 page for you to edit then you can read up on the WordPress Codex at their Creating an Error 404 Page entry.  I’m linking to the Codex for this because it will remain up to date with new versions of wordpress, so it’s the best resource for creating your own 404 pages.

How To Monitor 404s In WordPress

Thanks to Weberz Hosting we have the 404 Redirected plugin (which we use to handle 404 redirection on this site).  404 redirection works by identifying a url that resulted in a 404 error, figuring out what existing page the user was most likely attempting to reach, and creating a permanent redirect from the non-functional url to the correct page.  In my opinion, 404 Redirected is the best plugin available for WordPress to tackle this problem, as the interface is very intuitive and the plugin automatically attempts to identify appropriate redirections.

Installing 404 Redirected WordPress Plugin

(click to enlarge)

Configuring 404 Redirected is very easy.  The options screen has 22 settings, and that might seem like a lot to some people, but the defaults are actually pretty good.  Here is a screenshot of the optimal settings.

Configuring 404 Redirected WordPress Plugin

(click to enlarge)

With these settings in place your WordPress will first check the incoming page to see if its a close match for any other page on your site, and if it is an automatic redirect will be done.  For example, lets say a user visits your site and you have a page with this URL:  http://www.domain.com/something.  A visitor comes to your site but the URL they enter on is http://www.domain.com/somethin.  Normally that missing g at the end will force your site to show the user an error page.  404 Redirected will catch this and automatically redirect that visitor to http://www.domain.com/something.  After successfully identifying an appropriate redirect, the plugin will permanently redirect all traffic from that incorrect url to the right one.  This feature catches most common misspellings, which is great if you have people manually typing in urls in their browser, or links to your website through twitter or other social media.

Manually Redirecting 404 Errors

Now lets say the user visits http://www.domain.com/lskdghf.  Assuming you dont have a very strange page named lskdghf, that user is going to get sent to a 404 page (hopefully your nice new custom one).  Since 404 Redirected can’t make any reasonable guesses as to what that user was looking for, it will log the error in its WordPress admin page and you can view the log of errors and deal with them manually.

Viewing 404 Redirected WordPress Plugin

(click to enlarge)

The screenshot above shows the admin page I visit most often in my WordPress install.  This Captured 404 URLs page makes it easy to redirect any incoming visitors to the page you think they wanted, or just the page you want them to visit.  Hopefully when you see this screen, it says “No Records To Display”, but usually after a few days of waiting you will see at least a couple.  If you’ve just moved or redesigned your site you might be unlucky enough to see pages and pages of 404 results here.  If, like most of us, you see something in this log then it needs to be dealt with.  Capturing those users and the general SEO benefits are just to valuable to ignore.

Placing your mouse over the entry you want to redirect gives you four options: Edit, Trash, View Logs and Ignore 404 Error.  Edit allows you to redirect the error to anywhere on your blog, or to an external url.  Trash just deletes the error, which will allow it to re-appear in the list if it happens again.  View Logs shows you the full log for this error, which includes the IP address and time of every error.  The last option, Ignore 404 Error, puts the error into an ignore list which makes it stop showing up in the list.


Clicking on the edit link takes you to a page that allows you to redirect the bad URL to a good one.  You have a few choices here.  You can redirect the visitors to an external page, or an internal page.  If your sending them to an external URL then it just has to be a valid working URL, this could be http, mailto, or any other type of link.  You can also chose between 301 or 302 for the redirect.  These http codes have specific meanings.  A 301 redirect is permanent.  By selecting this you are telling the visitors web browser, or the search engine bot, that this page has moved and it is a permanent change to your site.  A 302 redirect is temporary.  These might be used if your site is under maintenance and you are re-arranging things, but plan on putting those links back, or aren’t sure that this is going to be the final destination for that traffic.

Viewing 404 Redirected WordPress Plugin

(click to enlarge)

When this page came up the URL field was already filled in.  So all we have to do is select where we want to redirect it to and hit the Update Redirect button. Nine times out of ten your going to be selecting an existing post, page, category, or tag from your site.  I moved my site from a static html site with a blog in the /blog/ directory, to a site completely based on WordPress about 2 weeks ago. This left a lot of incoming traffic causing 404 errors.  The example here is one of the most common ones, its a tag page that needs to be redirected to the new tag page.  This is going to go from http://www.localseocompany.net/blog/tag/rss-feed/ to http://www.localseocompany.net/tag/rss-feed/.  In the screenshot below you will see what the dropdown menu looks like, it shows you posts, pages, categories and tags (in that order.)

Creating a Redirect in 404 Redirected WordPress Plugin

(click to enlarge)

For most of these it will be pretty easy to tell what you should do.  In the list above it shows four entries.  We just fixed the first one.  The next one is just our example, so it can be sent to the Trash.  The third one is also easy, its obviously a broken link somewhere. But you can tell that it is meant for the SEO Service Pricing page, so just redirect it there.  The last one is a mailto link.  This one cant be done with the dropdown menu on this page, you have to put the URL to redirect to in the External URL field on this page, then hit the Update Redirect button.

Creating a Redirect in 404 Redirected WordPress Plugin

(click to enlarge)

Anything that doesnt seem to have a logical place, or that doesnt make much sense I just redirect to the Home page.  Whatever page on your site you have set to show up at the root, for me I always name it Home.


The trash feature doesnt really need much of an explanation.  When you click on this link it removes the entry from the list and puts it in the trash.  You can see in the list above that there is a line on the screen that says Captured URL’s (4) | Ignored 404’s (489) | Trash (17).  If you click on the Trash link here you will be shown everything in the trash currently and you can clear it all with the Empty Trash button.

View Logs

The View Logs link takes you to the Log page with it filtered to just show entries from this 404 error.  It shows you the URL, IP Address, Referrer, Action Taken, and Date.  The URL is the same one you saw on the list of 404s.  The IP Address can be used to do some research and see if you can figure out who or what caused this.  I only find this useful to figure out if it was a bot such as google or bing, or if it was a normal visitor.  I dont actually use this screen to much, it only comes into play when there are a lot of 404s to the same URL and I really need to figure out where its coming from.

Viewing the Log 404 Redirected WordPress Plugin

(click to enlarge)

Ignore 404 Error

Generally, you don’t want to ignore most 404 errors, since the whole idea is to capture that traffic and redirect it elsewhere on your site. Sometimes, though, 404 errors are the result of bots scanning your website for vulnerabilities — not legitimate traffic.  When you learn how to identify these kinds of 404 errors (and make sure the holes they are attempting to exploit are covered) you can safely ignore them. Most of my ignore list right now is attempted exploits of the Timthumb vulnerability (you can read more about it at Mark Maunder’s blog).  After running the Timthumb vulnerability scanner I didn’t need to be notified every time a bot tries and fails to break into my blog, so it’s easier for me to just ignore them.  Here’s a little bit of my current ignore list (there’s about 30 pages of similar looking urls):

Viewing the Log 404 Redirected WordPress Plugin

(click to enlarge)


Keeping track of incoming 404 errors, creating a useful 404 page, and actively managing 404 redirection takes some time to set up, but the result is a website with better search engine appeal, better functionality, and a lower bounce rate.  Over time, you’ll find that you have to spend much less time with 404 errors, as common errors are slowly added to the automatic redirection list and you learn to identify the errors left by failed attacks instead of visitors.

Other Posts

There are 4 comments. Add yours.

  1. This is a great explanation of the 404 problem and how the plugin works. We receive a number of inquiries from people who just don’t seem to understand how the plugin works. Now we have a page to point them to.

    Nice work Gregg!

    • Glad you liked it. The plugin is great. I’m currently using it on 9 blogs.

  2. By the way if you want to simply catch 404 pages as they happen I have a few good one-liners over on my post http://www.bestrank.com/blog/how-to-catch-404-error-pages-and-301-redirect-them-in-real-time

  3. Dharam Chaudhari

    Thanks Gregg for Sharing dept information about 404 redirects.

Leave a Reply

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