Broken links contribute to a bad user experience and can cause people to click away
We all know that feeling when you’re searching for information online and get a 404 error. Do you try to find the page on the site, or do you just leave? Are you losing traffic to broken links on your site?
Do you have broken links on your site? Let’s find out.
How to find and fix broken links on a WordPress site
From your dashboard go to Plugins>Add New and do a search for “broken links”. There are many broken link checker plugins to choose from, but the one I use is “Broken Link Checker” by WPMU DEV.
It is important to only install plugins that:
- Are frequently updated – meaning they are well-maintained
- Are compatible with your version of WordPress
- Have a lot of happy users
All this information is available before you install.
Once it is activated, you can find it at Tools>Broken Links from your WordPress dashboard. If you’ve installed the plugin for the first time give it a few minutes to check through the links on your site. If you have a lot of links it could take a little while, but you can go ahead and start fixing some of them as it’s finding them.
Click on the “Broken” tab and see if anything shows up.
It did find a broken link on my site in the example in the video.
You can choose to:
- Unlink it from the text – it will go on the page and remove the link but leave the anchor text
- Edit the url – put the correct URL and it will replace it.
- Dismiss it – this tells it to ignore it
For each broken link, it will tell you the status, the link text, and the source (the page it is on).
NOTE: It may flag YouTube video links as a problem – dismiss them
You also want to clean up any links in the “Redirect” tab
Click the link and it will open in a new tab. Copy that new URL and go back to your broken links page and edit the link. These typically happen when you or another website change the page name or when sites are moved from http to https. Even though it is not a “broken link”, it is good practice to clean these up as well.
Get notified by email about broken links
If you leave this plugin running, it will email you when it finds any broken links. Or if you prefer to not leave it running, uninstall and reinstall this plugin when you want to check for broken links. It is a good idea to do this monthly or at least quarterly to keep your website in good technical shape.
Finding broken links on sites that DO NOT use WordPress
If you aren’t using WordPress, there are several websites that will check your entire site for broken links. www.deadlinkchecker.com is one that I use. Enter in your website URL and click the “check” button. If you have a large site, this can take some time so go get a cup of coffee while it runs. After it finishes it will output a report which contains a list of 404 errors that it found it.
This method is not as quick and convenient as using a WordPress plugin, but it still allows you to hunt down broken links on your website.
Preventing broken links
Now that you’ve found all the broken links and cleaned them up, how do we prevent them from happening in the future?
There isn’t anything you can do about other people’s websites, but you can prevent 404s on your own site. If you change the page slug (the url address to your page) for a published page, you might have just caused a broken link.
If you were pointing to this page on your site or someone else had a link pointing to it, it is now broken. It is important to set up a redirect from the old page name to the new page name if you decide to change the page slug.
What does a redirect do?
- It tells search engine crawlers “Hey this page has a new address” so they can update the link if it was indexed
- Visitors that click the old link are seamlessly redirected to the correct page
If you aren’t already using a plugin to manage your redirects, go to Plugins>Add New and search for “redirection”. I use Redirection By John Godley
Once you activate the plugin it has to run a setup. See the video on this page if you want to see me go through the setup process. I don’t change any settings, and once it is complete I hit finish.
You can find the redirection page at Tools>Redirection from the WordPress dashboard. To add a new redirect, simple add in the old page URL and the new page URL and click the “Add Redirect”.
Now you will see the new redirect in your redirects list. From there you can delete them or edit them as needed. When you check back on this list in a few weeks, it is going to give you some good data like the last time the old link was accessed and how many times someone used the old link. If no one has access the link in months, you should be safe to delete the redirect.
Redirects should really be a temporary fix.
Search engines update the link fairly quickly. If you are still getting clicks to the old links months after adding in the redirect, you must have the old links somewhere. If it is on your own site, the broken links checker will catch it. It will show up under the “redirects” tab and you can fix the link to the correct URL.
If the clicks are coming from another website that is pointing to your old page AND you know what website is pointing to it, you can contact them about updating the link.
Technically a 404 error is a correct response, and search engines will not penalize you for them. Without a redirect in place, the search engine will just remove that page URL from indexing. However it is better to have them replace that link with the corrected one. 404 errors more importantly offer a bad user experience, and that is why it is important to clean them up as much as possible.