This project is not covered by Drupal’s security advisory policy.

Editoria11y Link Checker is part of the Community Supported Add-ons (CSA) suite for the Editoria11y Accessibility Checker, adding the ability to monitor pages for broken and redirected links. Reports live under the Editoria11y dashboard, and broken links are highlighted inline both on the page and while editing in CKEditor, Gutenberg and Canvas.

Alert toggle pinned to link with tooltip explaining that the link is broken

The module is designed to dramatically reduce server load and increase coverage compared to other link checkers:

  1. Links in content, menus, blocks and Views, or even hard-coded in themes, are all automatically discovered. Links are harvested by editors' browsers or the Editoria11y CSA crawler rather than string and DOM parsing of manually configured content fields during node save events.
  2. Discovered links are fully deduplicated, queuing only one check per URL, and storing a single record for each template or menu link, rather than duplicate references to every node on the site.
  3. The vast majority of links on most sites are to valid internal routes; these are all monitored using simple table lookups rather than loopback HTTP requests that require full Drupal bootstraps.

 

How it works

  1. Harvest. When an editor views a page, Editoria11y collects every link, discards functional or ignored links, and attaches a list of new or changed URLs to the accessibility checker's report. If the site has a CSA membership license or trial, it also groups links by region (header, navigation, content, footer by default) to improve report views and allow for site-wide deduplication.
  2. Store. On the server, each distinct URL is normalized, deduplicated and stored, with an entity reference back to the relevant page and/or region.
  3. Check on cron at a configured interval, with the method based on the link type:
    • Most internal paths are validated by Drupal rather than requested: the path is resolved through aliases, redirects and the router, the target entity is checked for anonymous access, and files are checked on disk. This reduces server overhead over HTTP request HEAD checking.
    • Internal paths the router cannot validate (Views with arguments, private files) are requested over HTTP as an anonymous visitor.
    • External links go to a queue worker that requests them politely. Requests are heavily throttled: one request at a time per host, with a limited number of links per host per run. Optional configuration allows attaching an email address to the request, which can help reduce crawler blocking by some cloud CDN vendors.
  1. Flag. A link whose last check failed shows an inline alert; broken (404) are a red alert, other suspicious statuses are manual check request (e.g., redirects to a different domain). Editors can mark either type as OK or broken.
  2. Report. The Links tab under Reports → Content Accessibility contains lists of all discovered links, organized by URL, page or status, as well as a report for urgent alerts: broken links in menus or on specified "key" pages:

    Broken link report showing a category of urgent links in key pages and menus, and all links

 

Similar modules

  • Link Checker also provides site-wide reports of broken links, but does not highlight errors inline in the page. It collects server-side, which is more secure than a browser-based harvester, but has significant setup and maintenance requirements: individual field and block types have to be compatible with the module, and be configured to include their contents in the extraction on save. Editoria11y runs against the rendered page in full. Link Checker also requests all links over HTTP, including internal; Editoria11y provides this as an option, but by default trusts Drupal's internal route resolver for resolvable internal routes.
  • Node link report scrapes links on the currently-viewed page and reports the findings in a block. It does not provide site-wide reports.

 

Initial setup

Link checker settings page showing counts of discovered and checked links, and a setting to crawl all links or only internal

  1. Set permissions, and configure the ignore lists.
  2. Open the Network settings and crawl speed config section and provide your Site URL if your `settings.php` does not set specific trusted_host_patterns (one of the two must be provided for loopback http requests to validate local files), add a contact URL to attach to the crawler's user agent, and check if the proxy network information applies to you.
  3. Open the Link inclusions and exclusions config section and set CSS selectors or URL patterns for links to ignore, and review options for user profile pages, URL parameters and site aliases. If you are a CSA member, set template regions and key pages
  4. Visit several pages to harvest their links, then run cron, then check the "Crawl Status" view in the new Links tab of the Editoria11y dashboard to confirm checking has begun
  5. By default you are going to see a lot of manual checks on external links to sites that use services like Cloudflare and Fastly to block bot crawlers. If you use these services and have many sites trying to check each other, consider allowing your custom user agent (computed based on your settings, look for userAgent in httpProbe) through for local requests. Otherwise, consider turning off manual checks for unverifiable hosts in the Choose which alerts to show config section.

Remember: Editoria11y link discovery runs in browser, not on the server. The script only sees pages when logged-in editors view them. If you are installing on a large existing site, we recommend installing the Editoria11y CSA submodule and using its crawler to quickly collect all the links on your existing pages.

Ignores

Two layers decide what is never harvested:

  • Built in, not configurable.
    • Links into Drupal's administrative and functional routes are dropped for internal links: /admin, /user and its login, logout, register and password pages, add, edit, delete, cancel, revisions, translations, layout, latest and preview pages, /batch, /cron, /filter/tips, /contextual, /session, /jsonapi, Views and system AJAX paths, and URLs carrying a destination, token, ajax_form or _wrapper_format parameter. Each is matched behind an optional language prefix. The same list is applied in the browser and again on the server, and the maintenance run removes links an updated list no longer accepts.
  • Configuration:
    • Ignore links to user profile pages: links to /user/123 are ignored by default. Sites with public profiles should turn this setting off.
    • Ignore URLs matching these patterns accepts regular expressions matched against the absolute URL of every link, internal or external.
    • Do not harvest links inside these containers holds CSS selectors (toolbar, contextual links, local tasks by default).

Internal links are identified by their path plus the query parameters listed under Query parameters kept on internal links. Every other parameter is dropped before the link is stored, so /events?utm_source=x is stored and checked as if it is /events.

 

CSA membership

This is a very large module ecosystem, and it takes a village to keep it running. The CSA is a "farmshare" of all the people supporting these modules...in any way. If you are willing to put in the time to test and provide feedback (UI, documentation or bugs), you can ask for full membership ("Apply for subscription credits") without being a financial supporter. If you do want to support the project financially, you can choose your own support level.

 

AI disclosure: Editoria11y's core proudly predates AI, but recent feature development is usually assisted by or tested with Opus, Fable and Astra.

 

Supporting organizations: 

Project information

Releases