Having links on your website that don’t work and give a 404 error either due to a typo or expired domain name is annoying for your website visitors and negatively affects your SEO.
Prevent broken links
To prevent broken links on your WordPress website, you should develop a habit of running a scan for them on your website, at least once a month.
Luckily, there’s an excellent plugin for WordPress that can automate the scanning process for you and make things easier.
In this article, we’ll show you how to scan for broken links on your website and fix them.
Broken Link Checker plugin
Login to your WordPress dashboard and head to the Plugins section > Add New.
At the top right of the page, type Broken Link Checker in the search field, and once it yields results, click the Install Now button under Broken Link Checker plugin.
Once installed, activate the plugin and head to Settings > Link Checker section.
This is where you can configure various settings for the plugin.
Here are our recommended settings.
General section
Check each link – 72 hours, as you don’t want to overload your server with frequent scans (new links are scanned immediately automatically).
E-mail notifications – we recommend enabling this option so you can receive an email notification each time the plugin finds a broken link on your website.
Link tweaks – enable Stop search engines from following broken links option to prevent possible SEO problems.
Suggestions – set this to on, to receive automated suggestions for broken link alternatives.
Warnings – set to on.
Look for links section
In this section, you can configure the plugin to look for broken links in certain areas of your website.
We recommend enabling comments, pages, and posts for starters, and if you use custom fields – enable those as well.
Additionally, you can set which post statuses are being monitored, and our recommendation is to configure this for Published and Scheduled posts.
Which links to check section
In this section, you can configure which links are being checked by the plugin. We recommend using the default selection unless you use videos hosted at DailyMotion or Vimeo, in which case you can enable those as well.
Additionally, you can set up an exclusion list that allows you to exclude certain words from being checked in links.
Advanced section
We recommend leaving default values in this section, but in case you need to enable logging or force a recheck of all links on your website (resource intensive), you can do that here.
Now that we’re done with the setup, head to Tools section > Broken Links option.
This screen will show any link that was flagged by the plugin as broken:
If you hover your mouse over any broken link, you will see a set of options available to use:
The plugin allows you to:
- easily edit the URL
- unlink it (and leave it in text mode)
- flag it as not broken
- dismiss the notification
- and re-check the URL again
You can also Edit, Trash, or View the post where the broken link was found under the Source section of the row.
In addition to that, clicking on the Details button under Status section will show more details about the broken link:
Bulk actions
You can also use the Bulk Actions drop-down menu to apply certain actions to multiple links:
And a Search option to find the exact links on your website:
In our example, we will use the Edit URL option under the broken link to fix the link in question without the need to load the post itself: