How to Find and Fix Broken Links in WordPress?

What is a Broken Link?

Broken links are hyperlinks on a website that, when clicked, lead to non-existent or inaccessible pages.

There are two main types of broken links: internal and external. Internal broken links are links that point to pages within the same website but are no longer available. This can happen when a page is deleted or its URL is changed without implementing a proper redirect.

External broken links are links that point to pages on other websites that are no longer active or have been moved. This can occur if the external website changes its URL structure or removes the linked content altogether.

Technically, a broken link has a status of 4xx or 5xx. Usually, the status is 404 - Not Found or 500 - Internal Server Error, but it can be any in this range. Common statuses and there meaning are:

  • 400: Bad request
  • 401: Unauthorize
  • 403: Forbidden
  • 404: Not Found
  • 500: Internal Server Error
  • 502: Bad Gateway
  • 503: Service Unavailable
  • 504: Gateway Timeout

Having broken links on a website can lead to a poor user experience, as users may encounter error pages instead of the content they were expecting. They are often frustrated and may leave the site, leading to a higher bounce rate. Additionally, broken links create a poor impression of the website owner's attention to detail and maintenance.

From an SEO perspective, broken links can harm a site's rankings on search engines. Search engines like Google consider broken links as a sign of poor quality and may factor them into their algorithm, resulting in lower visibility in search results.

What Causes Broken Links?

One common cause of broken internal links is when web pages or content are moved or their location is changed within the WordPress site. This often happens when website owners reorganize their website or modify the structure of their pages.

Another cause of broken internal links is when web pages are deleted without implementing proper redirection. This means that any links pointing to those deleted pages will result in a 404 Not Found error, frustrating visitors and harming the website's credibility.

Spelling mistakes in links can also lead to broken links. A simple typo in a URL can render the link useless and result in a broken link.

Changing the permalinks of a page or post without considering the impact on existing links can also cause broken links. Permalinks are the permanent URLs of individual pages or posts, and altering them without setting up proper redirection can result in broken links throughout the website.

Outgoing links to external websites that have dead pages or have changed their URL structure can also cause broken links.

External websites can also be unavailable or behind a firewall that blocks external requests. When accessing these links, you'll see 5xx error pages. That causes the links are inaccessible but both users and bots and make them dead links.

How Broken Links Affect SEO?

Broken links can have a negative impact on SEO as they prevent search engine bots from effectively crawling and indexing a website. Search engines like Google or Bing send their bots to scan all the links on a website, but when they encounter dead links, it disrupts the crawling process and can lead to pages not being indexed. This means that the affected pages won't show up in search results, reducing the website's visibility and potentially harming its SEO rankings.

While a few broken links may not have a significant impact, it's crucial to manage and fix them to maintain a good website reputation. Broken links can create a poor user experience, as visitors may encounter dead ends or error messages when navigating the site. This can increase bounce rates and deter potential customers, negatively impacting user engagement metrics that search engines consider when determining a website's quality and relevance.

To avoid these issues, regularly checking for broken links using a powerful site audit tool or a WordPress broken link checker plugin can help identify and fix them quickly.

In this post, we'll focus on WordPress and let's see what plugins are best for finding and fixing links in WordPress.

Best WordPress Broken Link Checkers

Slim SEO Link Manager

Slim SEO Link Manager: your link checker tool for WordPress

Slim SEO Link Manager is a robust WordPress broken link checker plugin that simplifies the management of broken links on your website.

The plugin thoroughly scans your WordPress website, detecting any links and providing you with a comprehensive report. This detailed report highlights all the links found with their corresponding status, allowing you to easily pinpoint the issues that need to be addressed.

Slim SEO Link Manager's report for links by statuses

For a broken link, the status is 4xx-5xx, which is highlighed as red in the report. Clicking on the status row in the widget will give you a full list of all links:

Detail report for all broken URLs in Slim SEO Link Manager

In this report, you'll see details such as:

  • Which source post that has the link
  • What is the URL
  • What is the anchor text
  • Is it follow or nofollow?
  • And the HTTP status

When hover an item, you will see links to view or edit the source post. This is a simple way to manually edit the post to fix the broken link.

Besides of the link audit functionality, Slim SEO Link Manager is a powerful plugin to let you understand links on your website with many helpful features for SEO:

  • Automatic link suggestions when writing posts to build internal links
  • Real-time link reports for a post, so you'll know details about inboud and outbound internal and external links
  • Automatic update link when a post slug changes: this is an important feature that prevents and automatically fix broken links to a post when its URL change.
  • Bulk update links in the content: which allows you to fix links in bulk. We'll see it in detailed below.
  • Insightful reports for: top linked pages, link statuses, external links, orphan pages and keywords

A big advantage of using Slim SEO Link Manager is that it's optimized for performance. The scanning and updating links processes don't harm your website performance at all!

We'll see Slim SEO Link Manager in details below on using it to fix broken links.

Broken Link Checker

WordPress Broken Link Checker Plugin

Broken Link Checker is a powerful plugin that helps you easily identify and fix broken links on your WordPress site. This plugin offers a user-friendly interface and automated scanning capabilities, making it an essential asset for website maintenance.

With Broken Link Checker, you can conveniently monitor their website for broken links, both internal and external. The plugin continuously scans the entire website, including posts, pages, comments, and even custom fields, to detect any broken links that may negatively impact the user experience and SEO performance.

Dashboard status in Broken Link Checker plugin

Once broken links are identified, the plugin provides an intuitive dashboard where users can review and manage the broken links efficiently. It offers options to edit or remove broken links directly from the dashboard, saving valuable time and effort.

It also has the ability to prevent search engines from following broken links, reducing negative impacts on your site's SEO rankings.Furthermore, the Broken Link Checker plugin allows users to customize the scanning frequency and notifications to fit their specific needs.

The plugin offers two mode for scanning links: cloud (which run the scanner from the author's server, and that reduce your website load) and local (which run the scanner on your server). Historically, Broken Link Checker is known for performance issue when scanning your website to find links.

How to Fix Broken Links in WordPress?

When you finish scanning all the content on your website and get the broken link report using one of the plugins above, it's time to fix them. Usually, there are several methods to fix broken links:

  • If the content is moved or redirected to another location (due to website structure changed or domain changed, or URL structure changed), you'll need to update the old URL to the new one.
  • If the content is deleted, or no longer exists, then you need to remove this link, or replace it with a similar one that has the similar content.
  • If another website links to your deleted page, then you'll need to redirect them to the new corrected page.

We'll cover each method below:

Updating old URLs to new URLs

Imaging you have a link for a blog post A in many places on your website. And now you decide to change the URL of the post A. That action will make all links to A in other blog posts broken.

To update links to A in other posts, we'll use Slim SEO Link Manager. After scanning links, go to Slim SEO > tab Link Manager > sub-tab Tools and click the Link Updater button:

Bulk link updater in Slim SEO Link Manager

A new form will appear to allow you enter the old link and the new link:

Updating old URL to new URL in Slim SEO Link Manager

In this demo, I change the old link to the Slim SEO website with HTTP to the HTTPS version to avoid any redundant redirects.

Click the Update button when you finish. The plugin will search through all posts for the old link and replace it with a new link.

Repeat the process for other links that you want to update. After that, you'll see the link report is updated.

Also note that not all links point to a post that is moved to another location. Some links, especially outgoing links, point to a website that is no longer exist, like a dead website, or simply the domain expired and the website owner didn't renew. For those links, it's best to remove them or update them to a similar URL using the same technique above.

This is a robust and automatic way to bulk update links in posts and that saves you a lot of time (instead of updating each link in each post manually).

Creating Redirects for Dead Links

After updating old links on your website, your website won't have any broken link. However, if you share any old links elsewhere like on social media, or another website links to your old page, then when users visit this page, they'll see a Not Found error and that sucks. In this case, it's best to implement redirects for broken pages.

To monitor Not Found pages and implement redirects, let's use Slim SEO, a lightweight and powerful plugin that automates your SEO tasks. Slim SEO has a built-in redirection module that helps you address this issue.

Slim SEO - A Lightweight and fast WordPress SEO plugin

Installing Slim SEO is easy, simply go to your WordPress dashboard > Plugins > Add New and search for "slim seo" and then install and activate it.

Installing Slim SEO within WordPress dashboard

After installing, go to Settings > Slim SEO > tab Redirection > subtab Settings and enable 404 logs:

Enable 404 logs in Slim SEO

This settings will log all of 404 pages on your site with their URLs. When a user visit an URL that doesn't exist on your website, the plugin will log them into the database. And you'll see the list of all 404 pages in the 404 Logs tab:

List of 404 pages in WordPress

To create a redirect for a broken page, click the Add Redirect icon in the Actions column:

Adding a redirect for a 404 page

A popup will appear that helps you to create a redirect. It's similar to add a redirect manually, except that the From URL is auto filled by the 404 URL.

Adding redirect details in Slim SEO

Enter the To URL and click Add Redirect button to finish.

From now on, when users visite this page with incorrect URL, they'll be redirected to the new URL.

If you're lazy to implement redirects for each 404 page, Slim SEO offers an automatic redirect all 404 pages to your homepage. While this is not always good as it might give users not the content they're looking for, it's better than showing them a Not Found message.

Conclusion

Broken links not only negatively impact the user experience but can also harm your website's search engine rankings. Using a WordPress broken link checker like Slim SEO Link Manager, you can effectively identify and fix them, ensuring that your WordPress site remains in optimal condition.

Addition redirects also help redirecting users to the updated pages when they visit 404 pages. Implement the strategies shared in this blog post and make it a routine part of your website maintenance. With a little effort, you can enjoy the benefits of a smooth and successful online presence.

Leave a Reply

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