Score:-3

How to find all broken links in a website?

ng flag

I can use external tools to scan for broken links in my website (Screaming Frog for instant check and even Google Search Console for non instant check come to mind) but I wish to use Drupal.

How to find all broken links in a website?
Does Drupal report all broken links inside a website anywhere?

leymannx avatar
ne flag
Drupal reports all 403/404 when being accessed. To find all broken links you need to run an external tool that crawls your whole page. This is nothing specific to Drupal.
ng flag
@leymannx there could be such a tool in Drupal just as there is one in MediaWiki. Yes, the programs are very different but I don't know much about upgrades in Drupal 9.
leymannx avatar
ne flag
MediaWiki is no content management framework like Drupal where links could exist in literally a million places that are hard to guess.
Score:1
cn flag

Actual broken internal links (when a user clicks a link that is broken) are reported on the status report at /admin/reports/dblog. You can filter by "page not found" to show all the bad links.

If you want to find external links and also identify broken internal links before your users do, you can use the Link Checker module.

That said, I think a better approach is to use one of the sitemap modules (Simple XML Sitemap or XML Sitemap) to list all the public content on your site and then point an external tool at the sitemap.

ng flag
`/admin/reports/dblog` will present the link only if the link was clicked? Darn, I aspired for something that doesn't require that...
cn flag
@drupalerdeepinside You can use the Link Checker module then.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.