how to fix broken links

Aside from causing usability issues, broken links has been debated by SEO experts as to whether they impact search rankings.

In my opinion, I don’t believe having a few broken links can hurt your search rankings which is typically quite common, especially on larger websites. Wikipedia is also one of the world’s most visited and highly ranked websites and is littered with broken links.

When Google crawls through linked pages on a website and detects a broken link it can stop crawlers from finding additional linked pages. If pages aren’t crawled then they will unfortunately not be visible in the search results.

What are broken links?

Broken links or dead links are links on a website that no longer work. We’ve all experienced clicking on a link at some point that eventually send us to a “Page not Found” otherwise known as a 404 page.

This typically occurs from:

  • The destination or page they were linking to was removed
  • The URL was entered incorrectly
  • The destination URL was moved

Broken links can negatively affect user experience and even hurt your search rankings. This will likely force users to leave a website thus increasing bounce rate.

This is why it’s important to identify any broken links on your website and fix them. Good news is there are plenty of ways to fix broken links and it’s really easy to do.

screaming frog broken link checker1) Screaming Frog

In a previous post I’ve mentioned the Screaming Frog SEO Tool developed by a UK company. This tool is great for on-page SEO as it can scan your entire website (usually in just a few minutes) for issues including broken links. There is a free version of this software that allows you to crawl up to 500 url and a paid version with more features for 140 pounds per year.

2) Google Console / Google Webmaster Tools

broken links in Google Console

List of Broken Links in Google Console

It amazes me how few web developers and SEO experts I’ve met either don’t know or don’t bother setting up their website on Google Console. It allows you to get very useful information about your website including broken links.

  1. Just click on Crawl->Crawl Errors on the side menu.
  2. Click on the Not found tab

You will see a list of all broken links on your website. There are two ways you can address the broken link data displayed.

1) You can setup 301 redirects in your .htaccess file for all old/broken links to point to a new destination page or

2) you can identify the page that has the broken link by clicking on the link itself then choosing the “Linked from” tab.

If you have thousands of broken links and your savvy with excel then I recommend exporting ALL broken links into an excel file and create another column with the new URL’s. By formatting the file you can quickly and easily create 301 redirect entries required for your .htaccess file.

google analytics broken links

List of Broken Links in Google Analytics

3) Google Analytics

You can also retrieve this same information from your Google Analytics. On the left hand menu select

  1. Site Content->All Pages
  2. For the Primary Dimension select Page Title.
  3. Enter “Page not Found” in the search box
  4. Click on the link for your 404 page
  5. This will provide all the broken links

Similarly to Google Console, you can export all the links into a CSV to prepare your .htaccess file.

4) WordPress Broken Link Checker

If your website is developed in WordPress then you can install the Broken Link Checker plugin which scans your entire website for broken links. Not only will it display all broken links found in a table but will also send notifications to your email harassing you to fix them. I’m not a fan of having too many plugins running on my WordPress websites so I would deactivate or remove this plugin after I’m done using it.

To install the WordPress Broken link checker you can download the plugin from WordPress.org or you can download and install it through the plugin library in your WordPress dashboard.

This WordPress plugin has some pretty neat features including:

  1. Ability to edit the links directly from the plugin
  2. Prevent search engines from following broken links
  3. It detects broken links, images and redirects
  4. Highly configurable in the plugin settings

5) Download the Broken Link Checker Chrome Extension

There are a few chrome extensions available for checking broken links. Once installed this extension highlights any broken links found within a web page. While I find this extension useful for SEO purposes I don’t find this to be an efficient way of checking broken links on a website especially if the site is large. Download the Broken Link Checker Chrome extension.

How to fix broken links on your website

Once you’ve identified the broken links on your website there are 3 ways to fix them.

  1. You can edit the page and correct the link.
  2. If your website is build in WordPress there are several redirect plugins that allow you to setup redirects without touching any files.
  3.  You can edit the .htaccess file and use the syntax below to redirect the old URL to the new URL.
Redirect 301 “/old-url-path/” “/new-url-path/”

Conclusion

As they saying goes “there are more ways than one to skin a cat”, so if you have any additional suggestions on fixing broken links I’d love to hear them in the comments below.