Search by

johnhenry / craft-link-audit

johnhenry

Finds broken links in your Craft content, checks each unique address once, and shows which entries to fix.

Package info

github.com/john-henry/craft-link-audit

Homepage

Documentation

Type:craft-plugin

pkg:composer/johnhenry/craft-link-audit

Fund package maintenance!

john-henry

Buy Me A Coffee

Statistics

Installs: 28

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.0.0 2026-12-04 12:46 UTC

README

Stable Version Static Badge

Link Audit

Link Audit for Craft CMS

A broken link checker for Craft CMS 5. Links break on other people's sites and nobody tells you, so it goes through your stored content, checks each unique address once, and shows you the exact entries carrying the ones that are broken.

The thinking behind it

A page-by-page checker asks a supplier about your footer link once for every page you have, until the supplier blocks it and everything they host turns up as broken. Link Audit keeps one record per unique address instead. The footer link is checked once, however many pages carry it, and the plugin remembers every entry, field and site it appears in.

Verdicts are kept for a while. A working link is trusted for 30 days before it is asked again, and a broken one is rechecked the next day, so a fix shows up quickly. The first scan does the heavy lifting; the ones after it only look at what has gone stale.

LinkedIn, Cloudflare and their kind refuse automated requests however healthy the link is, so those answers go on their own Unverifiable screen and are never counted as broken. A link that gives no answer at all is only called broken after it has failed a few times in a row, since a server that's down for an afternoon is usually back by the evening.

What it reads

Stored field values, not rendered pages:

  • Rich text (CKEditor and Redactor), including links inside nested entries
  • Native Link fields and URL fields
  • Hyper fields
  • Matrix blocks, nested up to ten levels deep, and Content Block fields
  • Commerce variants, along with their product
  • Navigation nodes, if you have verbb/navigation installed
  • Image sources in rich text, unless you turn them off, and iframe sources, if you turn them on

Because it reads stored values, it sees links on entries that have no public URL, and it can tell you which field a link came from. Internal links are looked up against your own elements and routes first, and only what those can't answer for goes out over HTTP. That way a redirect rule in Retour or in your server config is reported as a redirect, the same as a visitor would meet it.

There is a rendered crawl mode as well, for links hard-coded into templates. It is off by default, because fetching every page is the expensive way to do it.

What you get

  • An Overview that leads with how many links are broken and on how many pages, lists the pages to fix first, and sorts the broken links by why they broke, with a line on what usually fixes each
  • History after every scan: what broke, what was fixed, and a chart of the broken count over time
  • Lists for broken links, redirects, unverifiable links and links not answering, with filters, bulk actions and CSV downloads
  • A page for every address, saying what to do about it and where it appears, each place opening at the field that holds it
  • A panel on the entry edit screen with that page's broken links, and a dashboard widget
  • Scanning on save, so a link pasted in this morning is on the report without waiting for the next full scan
  • Ignoring: take one address off the report with a note saying why, or write a rule for a whole pattern or host
  • Results for each site on a multi-site install, with every address naming the other sites that carry it
  • A schedule, email or Slack alerts for new broken links, and an optional weekly summary
  • Console commands for every scan, and read-only tools for AI agents through Craft's MCP server

Documentation

Full documentation is at johnhenry.ie/plugins/link-audit/docs.

Requirements

  • Craft CMS 5.6 or later
  • PHP 8.2 or later

Accessibility

How accessible the plugin is, what's been checked, and how to report a problem are all in the accessibility statement.

Support

Need a hand? Open an issue on the GitHub Issues page.

License

This plugin is free to use under the MIT License.

John Henry - Craft CMS Plugins