How to Fix 404 Errors in WordPress

404 Page Not Found

Chances are you found this article because you found an old blog post or an old link to your site and when you clicked it, instead of finding the correct page you found a 404 page not found error message.

404 page not found errors happen because you linked to an article and then you changed your slug or permalink. Another possibility is maybe you deleted that article or revamped your website and the URLs for that page changed. No matter the case, you can easily fix these issues with a free WordPress plugin and a little work.

I’m sure there are a zillion WordPress redirect handlers, but I prefer one that gives me a good insight and control over how to handle those links rather then one that is magic. But if you have different solution I am super interested in hearing what works for you. So, tweet @webjarvis and let us know your favorite method of handling redirects in WordPress.

There are two types of people handle fixing 404s;

  1. someone who knows about 404s and
  2. someone who doesn’t know how to handle 404s.

Don’t worry if you’re in the second group, you’ll soon be in the first, majority of people reading this are in the second group so let’s cover how to handle a 404 page when you don’t know what 404s are.

How to handle 404s when you don’t know what 404s are

If you have a website and that website has been online longer than six months, chances are; you have 404s, everyone does. 404 page not found errors happen most commonly when you change the slug on a post and don’t realize it effects any links you’ve given anyone else.

Let’s say you wrote a blog article; mywebsite.com/blog/my-new-post and now that post is done you sent it out to everyone on social media.

Fast forward a few weeks, you realize you should be doing keyword research and you decide ‘the best blog post’ is a much better keyword for your post. So, you should change the slug and the title to mywebsite.com/blog/the-best-blog-post — no problem, off to the WordPress editor, you can have that changed in a jiffy.

Only problem is; now mywebsite.com/blog/my-new-post goes to a 404 page and to make matters worse, you posted that link on social media three weeks ago but it was still bringing in traffic. Now those people are getting 404 pages! What do you do?

Redirects to the rescue!

Redirects exist exactly for this purpose. And if you’ve ever driven a car before, they’re used just like they are in the construction business, if a road is closed or under construction, a detour will take you back to the right path. Well we in the internet biz have redirects to detour our customers from what was a working link to a new home.

Redirection

Redirection is the plugin we use to save us and help detour our website visitors to where they need to go.

Once installed go to “Tools -> Redirection”

screen shot of WordPress tools

 

From here you can choose “Add New” and let’s create a new redirect for our example website.

screen shot of a WordPress 404 page error redirect plugin

In our example, before keyword research we had “mywebsite.com/blog/my-new-post” and after keyword research we decided we wanted “mywebsite.com/blog/the-best-blog-post.” So for us, “my-new-post” is the “Source URL” and “the-best-blog-post” is the “Target URL.” Here it is properly filled out.

Screen shot of a WordPress Redirection plugin

Notice we left off the mywebsite.com but left the /blog/ and also notice when we hit “Add Redirect” we’re going to take any links *Source* from /blog/my-new-post and give it to *Target* /blog/the-best-blog-post.

That was easy! What’s next?!

Redirection¬†also has a “404s” section at the top where it logs any and all URLs that have happened. This is a great place to keep checking every once and a while to make sure you don’t have any traffic falling off to 404 pages. You can easily do the same steps we just did above to fix any links that are currently not longer working. Here you can see we have to do a little bit of work on our “company” page.

screen shot of 404 error correction plugin

 

Don’t want to manage 404s on your growing website? Talk to us, we’re nerds and we hate broken links, let us work them out for you!

About the Author:
Justin Reasoner
Justin is the Co-Founder and Senior Web Developer at Web Jarvis. He's a talented web developer, programmer, and dad to Ava. He has built numerous websites and applications from the ground up that not only look great, but perform exceptionally well. There's not a task or challenge he can't master or won't try.

Learn more about our team.
Posted in Web