View Categories

How to Find and Remove Broken Links from Your Website

404 error
  • Jul 30, 2020
  • 0
  • by A2 Support Team

If you’re a website owner, one of your major priorities should be providing a stellar User Experience (UX). Unfortunately, broken links are a major annoyance that can get in the way. If you want to keep your website in good shape, you’ll eventually have to deal with them.

In essence, broken links on your website point to missing internal or external resources. When they persist, they cause your site visitors a significant amount of inconvenience. This is why you need to fix them fast.

In this article, we’ll show you how to find and remove broken links from your website and also recommend some tools to help you do so easily. Let’s get to it!

Why You Need to Fix Broken Links on Your Website

You can consider a broken link (also sometimes called a ‘dead’ link) as any hyperlink on a website or page that doesn’t work. When you click on a broken link, instead of being redirected to the intended destination page, you’ll see an error page with a message such as “404 Page Not Found”.

An example of a 404 error page.

There are a few reasons why you may be experiencing this issue on your website. Some of the most popular ones include:

  • You entered the wrong Uniform Resource Locator (URL) for the link
  • You or the website owner (in the case of external links) deleted the linked page
  • The website the external link directs to was moved permanently or no longer exists
  • There is a firewall restricting access to the linked site or page

Whatever the reason, broken links can prove to be a real pain for your site visitors. Apart from affecting your site’s reputation, you can never tell how many customers you’re losing as a result.

If you leave your site unattended for too long, you may end up having so-called ‘link rot’ – a site with many broken links. This can also impact how your site ranks in search engines. Though Google says having two or more broken links on your site doesn’t necessarily hurt your rankings, search engine crawlers stop crawling your page completely when they run into a broken link. In other words, these abandoned pages do not get to be indexed.

Now we’ve established that broken links can be detrimental to your site’s overall health, let’s take a look at how we can find and get rid of them.

How to Find and Remove Broken Links from Your Website (In 2 Steps)

Broken links may cause you a lot of headache but finding and fixing them is a much easier procedure. You can easily find many free and paid tools online that can help you with this. The most effective and accessible free tool we recommend is Google Analytics.

In general, the process of finding and eliminating broken links with Google Analytics can be broken down into two steps. Let’s take a look!

Step 1: Generate a Report for Broken Links

Finding broken links with Google Analytics requires two different approaches regarding internal and external links. Let’s start with the former.

First, you need to figure out how your site generates a broken link error page. You can easily do this by typing in a URL you know doesn’t exist on your website. This way, you can simply check out the relevant browser tab for the name of the error page that appears.

Determining the name of the 404 error page.

Next, log into your Google Analytics account. Once you’re in, navigate to Customization > Custom Reports. Then, click the +New Custom Report button:

Creating a broken links custom report in Google Analytics.

Here, you’ll need to fill in the title of your choice under the General Information section. Then fill the following fields under Report Content as follows:

  • Type: Flat Table
  • Dimensions: select Page, Previous Page Path, and Page Title
  • Metrics: Unique Pageviews

Under Filters, exclude Previous Page Path. This ensures that only broken internal links show up in the report. Finally, include Page Title and add the name of the error page you discovered earlier in the Regex field. You can also simply fill in “404” as a generic value.

Creating an internal broken links report.

Finally, save the report. Now, when you open it in the future, you’ll find a comprehensive list of all your site pages with broken internal links:

A list of broken links in Google Analytics.

To find broken external links, the process is almost the same. However, you’ll need to make a few changes to the Dimensions field when creating a custom report, namely by including the Page, Full Referrer, and Page Title options:

Creating an external broken links report.

Once you’ve generated both reports, you’ve successfully identified all of the broken links on your website. Fortunately, fixing them is the easier part.

Step 2: Fix the Broken Links

Once you’ve located your site’s broken links, you can begin fixing them. The first port of call is with your website, and here you can simply update any incorrect URLs manually.

However, this isn’t going to be the answer to the whole problem, as there may be other sites sending visitors to your pages with broken links. In this case, you’ll want to change these page URLs either through manual 301 redirects, or a plugin such as Redirection:

The Redirection plugin.

This plugin will simplify the process of locating your dead links and managing the redirection process.

Using the plugin, you can easily add a Source URL (in this case the broken link) and Target URL (the intended destination). Once you save your changes, the plugin will do the heavy lifting when it comes to redirecting visitors.

Conclusion

Broken links and 404 errors are commonplace on the internet. Even so, you do not want them on your website. As such, catching and deleting them quickly is an important maintenance task.

With the help of free tools such as Google Analytics, you can easily find broken links on your website. When you’ve found them, these links can either be replaced or redirected with the help of additional tools.

 

Featured Image Credit: iStock.

The A2 Posting