How to Find Broken Links in Drupal Using Link Checker
Easy steps to start tracking broken links on your site.
Link checker is a module that regularly checks your content and reports broken links.
First, download it:
composer require drupal/linkchecker
Then, enable it:
drush en linkchecker -y
Now, you need to configure the fields you want Link Checker to check:
- Go to /admin/structure/types.
- Click on “Manage fields” on one of the content types.
- Edit the field you want to track broken links and enable link checker:
- Save the changes. Do the same process for all the fields and content types you need.
Once enabled in all the fields you need, navigate to Administration > Configuration > Content authoring > Link checker:
- Under “Link extraction”, select the HTML tags that should be scanned:
- You can adjust the rest of the settings in the page if the default values don’t suit your needs.
- Save configuration.
From now on, cron will check your links. Be aware that it will take some time to go through all the links in your site. You can find a report of broken links in Administration > Reports > Broken links:
You can also find the extraction status in Administration > Configuration > Content authoring > Link checker:
👉 Find out more about me here: https://sergioguardiola.net 🔥