How To Fix Broken Links (404 Error) In WordPress

Broken links are one of the worst issues that could impact your website SEO in a very negative way. It could also interfere with the user experience and turn away potential customers and clients from your business as well.

Who knows, maybe there are broken links on your own website without you even realizing. We want to help you solve that problem. In this guide, we’ll show you how to check for broken links on your WordPress website and how to fix them.

First, let’s try and understand what this broken links error really is and what causes it.

One Subscription: Everything You Need to Build a Website

Get everything you need to build your next website with one simple subscription. From $16 per month, get unlimited access to nearly 2 million WordPress themes, web templates, fonts, graphics, and photos.

Build Your Next Website

What is “404 Page Not Found” Error in WordPress?

You may have come across the famous “404 page not found” error when browsing the web. This error is shown when a URL you’ve visited no longer exists on the website.

404 Error - Landing Page

This error is so common that almost all websites have a special 404 page designed specifically to serve visitors who discover broken links.

Whether you’ve deleted a page from your website or changed the URL, the old links will still be indexed on Google. So when a user visits this link they’ll be visiting a “broken link”. And they’ll be presented with the “404 page not found” error page.

What Causes Broken Links in WordPress?

The 404 page not found error occurs when a user visits a URL that doesn’t exist. These URLs are called broken links.

Broken links can happen for various reasons:

  • Deleted Page: When you delete a page or a post from your website, it creates a broken link
  • Changed Slug: When you or someone else with access to your website changes the slug of a page that’s already been published, the old URL becomes a broken link
  • Wrong URL: If a user misspells (typo) the URL of a page on your website, they will only see the 404 error page
  • Changing Domain Name: If you decided to move a site to a new domain name or change location of a page in the server, it will create broken links

In most cases, broken links occur due to your own mistakes. Sometimes, broken links can go unseen and result in high bounce rates and even affects rankings on Google.

How to Find Broken Links

Needless to say, it’s important to find and fix broken links to keep your website healthy and maintain good SEO rankings. A good practice is to periodically check for broken links on your website to make sure the site is running smoothly.

Here are a few ways you can use to check for broken links.

Method 1: Use a Plugin

The fastest and easiest way to check for broken links in a WordPress website is to use a plugin. The Broken Link Checker plugin is specifically made just for this job.

This free plugin runs a deep scan of your website to find broken links on your website as well as the links in your blog posts and comments.

broken link checker

Once installed, the Broken Link Checker plugin will scan your site to check for broken links periodically. As a result, this plugin can be very power-intensive. It will eat up resources on your hosting server. Even the hosting platforms don’t recommend keeping this plugin active.

So instead, you should install the plugin and run a scan once to find all the broken links on your site. And once the links are fixed, deactivate the plugin.

A good premium alternative is the WP Link Status Pro. It’s optimized to work with minimum resources.

Method 2: Use Google Search Console

Another way to check for broken links is to use the Google Search Console.

If your website is registered with Google Search Console and being indexed by Google, the search engine will send you a notification when broken links are discovered on your website.

google search console

You can also login to your Search Console dashboard and go to the Coverage page to see if there are any issues or errors causing 404 errors.

A downside to this method is that you have to be the owner of the website to access the Search Console dashboard. And it usually takes a while for Google to discover and report 404 errors.

Method 3: Use an Online Tool

You can also use online tools to check for broken links on your website. This method is highly recommended since it doesn’t consume your server resources.

The Dead Link Checker and Broken Link Checker are both good options for testing websites for broken links.

dead link checker

If you can invest in a premium tool, both Ahrefs and SEMRush have tools for checking dead links as well.

How to Fix Broken Links in WordPress

Once you discover the broken links on your website, you’ll want to fix them. Unfortunately, the only way to fix a broken link is to redirect your broken link to a different page.

You can use Redirection, the free WordPress plugin for this task.

Step 1: Install Redirection Plugin

To install the plugin, first login to your WordPress dashboard and go to Plugins >> Add New.

redirection plugin - 1

Search for the Redirection plugin. Then Install and Activate the plugin.

Step 2: Customize Settings

After the installation, Redirection plugin will guide you through the setup process. To begin the setup, go to Tools >> Redirection page.

redirection plugin - 2

Here, you’ll be able to choose whether you’d want the plugin to monitor your URL and slug changes. So that if you or a different user accidentally change the slug of a page, you’ll be notified. Keep in mind that this too can consume a lot of server resources.

Step 3: Create a Redirection

Once you complete the setup process, go to the Redirection tab on the plugin page to create a new link redirect.

redirection plugin - 3

Copy and paste the URL to the old broken link into the Source URL field. And then copy the page link you want to redirect visitors to and paste it into the Target URL field.

Click Add Redirect to create a redirected link.

Now, whenever a user visit the old broken link, they will be redirected to another page on your site while avoiding the 404 page not found error.

Optional: Remove Links from Google Search Console

You can also remove or deindex links from Google using the Search Console.

google search console 2

The Search Console dashboard has a section called Removals. Use it to remove a single URL or multiple URLs from the Google Search index.

In Conclusion

Fixing broken links is a part of website maintenance and it takes an important role in keeping the site’s health in check. So make sure that you run a broken link check on your website at least once a month.

If you’re building a new website, you’ll want to check out our exclusive themes bundle. It includes 60+ themes for a single price. Perfect for freelancers, web designers, and bloggers for building all kinds of sites.