How to Fix Broken Links in WordPress with Plugins, Tools, and More

How to Fix Broken Links in WordPress with Plugins, Tools, and More

Finding a 404 Error on your website is very frustrating for both webmasters and site visitors. According to statistics, whenever a visitor encounters a 404 page during their first experience, there is an 88% chance they won’t come back.

One of the reasons behind this error is a broken link – a hyperlink that takes visitors to an empty page, whether it’s on your site or any external website. They might be down due to server issues or are set incorrectly in the back-end.

This article will identify the causes of broken links and provide multiple comprehensive solutions to find them. From using SEO audit tools to WordPress plugins, we will help you learn how to fix broken links in WordPress.

A 404 Not Found page will appear whenever a user clicks on a broken or dead link. This happens when the browser can’t find the content of the requested web page. In this case, the content was either deleted or moved somewhere else.

Besides these issues, there are other causes of broken links in WordPress sites, such as:

  • Misspelled URL. Incorrect URLs can direct users to a different page or trigger 404 errors to occur.
  • DNS (Domain Name System) propagation. The process of transferring a domain name to a new host can last for 48 hours and may cause errors on your site.
  • Temporary downtime. When the server responsible for a specific website stops working, it makes the site inaccessible.
  • Compatibility issues. Incompatible WordPress themes or plugins can interfere with your site files and affect your URL structure.
  • Changes in the permalink structure. These refer to the permanent links of your site’s blog posts. Changing their structure incorrectly can cause broken links.

No site is completely immune to having broken links – they are a common issue. The longer a website is available on the internet, the more likely it is to feature these problems. Additionally, a site that constantly updates its content and adds new pages is also more likely to experience link rot.

Pro Tip

If an error persists and it’s not a broken link, check out 7 Tips for Debugging Problems on WordPress

A broken link will lead your visitors to an error page, which will result in a bad user experience.

When your visitors fail to access the information they need, it will most likely drive them away from your website. This will increase your bounce rate and impact your SEO (search engine optimization).

Broken links will also waste your crawl budget as it takes away the number of links that Googlebot could have crawled. Instead of indexing your website’s new pages, the crawlers go through non-existent pages.

If Google web crawlers repeatedly come upon empty pages, they might consider your website out-of-date, negatively affecting your page ranking.

To avoid these issues, it is important to find and fix broken links on your website constantly. Doing so will improve your page’s quality and search engine rankings.

One way to find broken links is by manually combing through your WordPress site. However, this means you’ll have to go through each page and test every link attached to them.

Let’s assume you have a blog with many posts. Looking for broken links in WordPress manually would be inconvenient and very time-consuming.

Alternatively, there are several web-based SEO audit tools that you can use to perform this task automatically.

However, keep in mind that they will only provide you with a list of the broken links and the pages that use them. Later on, you’ll still need to visit each post to either remove or fix the faulty URLs.

The following sections will explain how to use each tool.

1. Semrush

Semrush is a popular SEO tool that allows you to monitor various metrics, from brand monitoring to position tracking. It also allows you to improve SEO by performing keyword research and website audits.

The site audit tool includes a feature to fix and find broken links on your WordPress site. It offers a limited free service that enables you to check up to 100 pages. To increase your quota, you can upgrade to its paid version, starting at $119.95/month.

To use it, you first need to create a Semrush account. Then, access the site audit page, enter your site’s URL, and click the Start Audit button.

Semrush Site Audit page.

Semrush will start the auditing process and display an overview of your site’s report.

Semrush Site Audit project list.

Clicking on the URL will provide you with more detailed information.

Semrush Site Audit Overview page.

Click on the Broken option to find broken links on the site.

Clicking the Broken option in the Semrush Site Audit Overview page.

The page will display a list of broken links from external and internal pages found on your WordPress site.

Semrush Crawled Pages page.

Finally, click on the Export button at the top-right corner of the screen to download your crawl report.

2. Ahrefs

Ahrefs is an SEO platform that offers a site explorer tool to help prevent link rot and detect broken links. It also provides a keyword generator, a content explorer, and a rank tracker to improve your overall SEO efforts.

To find broken links with Ahrefs, simply sign up for an account and pick a plan, starting from $99/month. You can also purchase a 7-day trial for $7 before committing to a plan.

Once you’ve logged into your account, proceed to the Ahrefs Site Explorer and fill in your WordPress site’s URL. The tool will start the crawling process, which might take several minutes, and display the results.

Ahrefs Site Explorer page.

To see the broken links found within your site, click Pages → Best by links. Then sort the results by selecting the 404 Not Found option.

Sorting best pages by incoming links in Ahrefs.

Next, export the results in a CSV file so you can use it later to fix broken links in your WordPress site.

To detect broken outbound links, navigate to Outgoing links → Broken links.

Detecting broken links in Ahrefs.

You will see a list of broken external links – along with each anchor text and broken URL. This makes it easier for you to locate the blog posts or pages containing broken links and fix them later on.

Click Export to download the broken link report.

3. Google Search Console

Another tool that lets you easily find broken links on your WordPress site is Google Search Console. It is a free service that allows users to monitor, configure, and optimize their websites’ visibility in search results.

Before getting started, you will need to add your domain to Google Search Console. Once you verify your URL, you will be able to use all of its features.

Log in to your account and choose the site you want to monitor. Then, select Coverage.

Monitoring a website in Google Search Console.

The tool will display how many errors it found on your site. Click on Excluded to view a list of all the issues detected.

Displaying Not Found 404 errors in Google Search Console.

Clicking on the Not found (404) option, you’ll see every broken link that is causing a 404 error.

Not Found 404 errors list in Google Search Console.

By clicking on each link, you’ll be able to see which pages contain it. You can also press the Download button to save the report.

While the previous web-based SEO platforms offer a handy solution to find broken links on your WordPress site, the following WordPress broken link checker plugins will help you fix them.

The Broken Link Checker plugin is one of the most popular options in the market. It is a well-documented, open-source plugin that includes many tools to help you fix the links on your site.

One of its most notable features is preventing search engines from following broken links. It also allows you to edit a broken link directly from the plugin’s interface without having to manually update each post.

To get started, all you have to do is download it from the plugin directory and install the plugin on your WordPress site.

Activate the plugin from your admin dashboard, then head to Settings → Link Checker to get fully accustomed to the features and options of the Broken Link Checker plugin.

Broken Link Checker Options page. After activating it, the Broken Link Checker plugin immediately starts scanning your WordPress site for broken links. You can see the results next to Status.

Broken Link Checker General tab.

Click on Found X broken links to open a page with all the broken links you have on your website.

Broken link list in Broken Link Checker.

To fix the broken links, click on the Edit URL or Unlink option below the broken link. You can also dismiss, recheck or mark links as not broken if you got a false-positive result.

Editing an URL in Broken Link Checker.

Configuring the Plugin

This plugin detects new links as soon as they are added to your site. However, you can specify how often you want it to check for broken links by accessing the General tab.

On the Check each link menu, the default value is 72 hours. Simply adjust the number according to your needs.

Tweaking the Check each link option in Broken Link Checker.

If you want to customize what type of content to monitor, you can set it under the Look For Links In tab. Mark where you want the plugin to check for broken links by clicking on each content type.

Look For Links In tab in Broken Link Checker.

Next is the Which Links To Check tab. It includes different types of links, such as HTML images, links, and plaintext URLs.

You might notice that the Broken Link Checker has given special attention to YouTube videos – it provides multiple ways to embed videos in WordPress.

Select what type of link you want the plugin to detect on your website, then click Save Changes. You can also exclude a specific URL by filling in the Exclusion List section.

Which Links To Check in Broken Link Checker.

Broken Link Checker doesn’t stop there. It also enables you to set which protocols to use when checking links. Go to Protocols & APIs if you want to change them.

Protocols & APIs in Broken Link Checker.

Finally, you have the Advanced tab. By default, the Broken Link Checker marks links as broken if it takes more than 30 seconds to load them. This value can be changed here.

Advanced tab in Broken Link Checker.

Another helpful feature is the Recheck all pages function. If you press this button, the plugin will re-check all the links you currently have. Other options such as bulk link editing and unlinking are found here as well.

The Link Checker plugin uses an external service to crawl and index pages in WordPress sites. It searches both external and internal links as well as images on your website, ensuring all broken links are detected.

Thanks to its external server, the Link Checker plugin can work with fewer resources, imitating a normal visitor on the site.

You can check 500 links using the free version while upgrading to its premium version will allow you to check up to 500,000 URLs.

Simply download the plugin from the WordPress directory, then upload and activate it on your admin dashboard to get started.

When the plugin is active, you will see a Link Checker menu on the dashboard.

Accessing the Link Checker plugin WordPress.

Select the Check your website option to start the process.

Selecting the Check your website option in Link Checker.

Click on the Result option to view the site’s report.

Result tab in Link Checker.

The report shows where the broken links were found, along with the post type and status. This makes it easier for you to locate, identify, and fix broken links on your site.

When you subscribe to a premium plan, you can also find broken images and videos embedded in any blog post.

Although WordPress plugins offer a practical solution to manage broken links from your admin dashboard, there are a few other methods you can use to fix broken links on your site.

These methods will require you to configure your permalink settings and access your .htaccess file.

Broken permalinks can trigger the 404 Page Not Found error on your website. This issue may happen due to various reasons, including new plugin installations and updates.

To solve this problem, try resetting the permalink structure through your WordPress dashboard. Go to Settings → Permalinks.

Changing the permalink settings in WordPress.

Select an alternative permalink structure. For instance, if your standard setting is Numeric, you can change it to Post name. Then, Save Changes.

Now, change the structure back to your standard settings and click Save Changes once again. Check your pages to see if this method worked. If the problem persists, try following the next method.

Reset the .htaccess File

The .htaccess file is responsible for performing essential WordPress tasks, from enabling features of your webserver to creating redirects.

Thus, if you encounter error pages on your website, the problem might come from incorrect changes on the .htaccess file.

In this case, you can try replacing the file with the default code by following the steps below:

1. Navigate to your hPanel → File Manager.

File Manager highlighted under Files on hPanel sidebar menu

2. Open the public_html folder and locate the .htaccess file.

3. Right-click the file and rename it. For example, .htaccess-disabled

The renaming of the htaccess file on Hostinger File manager

4. Create a new file and name it .htaccess.
5. Copy the code below and paste it into your new file.

# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress 

6. Finally, click Save.
This should reset your settings into default and reverse errors. Alternatively, you can also perform this process via an FTP client.

Conclusion

Adding links to your website content is a good approach to optimize your search engine rankings and provide information to the site’s visitors. However, if a link is broken, it can negatively impact your website’s SEO and user experience.

Luckily, with various solutions available, finding and fixing a broken link is not complicated. To help you easily find broken links on your website, we recommend off-site solutions such as:

  • Semrush Audit Tool
  • Ahrefs Site Explorer
  • Google Search Console

Note that WordPress plugins offer an even more convenient approach. Besides locating the site’s broken links, they allow you to fix the URLs directly on your dashboard.

The Link Checker plugin uses an external service to search through the site, meaning it requires fewer resources and doesn’t affect its performance. It is an excellent tool to help you deal with broken links in your WordPress website.

Which method do you prefer? Let us know in the comments below.

Author
The author

Nabilla R.

Nabilla is a website hosting and development enthusiast. She loves to share her knowledge with others in order to help them grow their online presence. When she's not busy writing, Nabilla enjoys exploring nature and going on adventures. She is passionate about helping people achieve their online goals.