Skip to content

links/broken-links reports Cloudflare email-protection links (/cdn-cgi/l/email-protection) as broken internal links #811

Closed

Description

@nc9

On sites behind Cloudflare with email obfuscation on, links/broken-links reports the obfuscated mailto replacements, /cdn-cgi/l/email-protection#<hex>, as broken internal links. In a 10-site comparison run on 2026-10-15 (released 0.0.113 source vs a branch, both 150 pages per site), three of the four sites with any broken-links items had only these: a docs site with 181 items, an IT services site with 119, a small SaaS site with 1. Across all ten sites only 7 real broken internal links existed. The rule's headline item count on those sites is therefore almost entirely noise, and every page that carries an obfuscated address in its footer or contact block is listed as a source page.

These URLs are not pages: Cloudflare rewrites mailto: links to them and a script restores the address in the browser. A status check of the path returns an error status, so the fetch is doing what it should; the link should never have been a candidate.

Expected

  • links/broken-links and the internal link check skip links whose path starts with /cdn-cgi/ (Cloudflare's reserved prefix; /cdn-cgi/l/email-protection is the common case), and so does the external link check for a third-party host.
  • The parser or the link extractor records such a link as an obfuscated email address (it is a contact affordance, like a mailto:), so rules that count contact links can still see it.
  • The skip is visible in the rule's details (a count of email-protection links left out), not silent.

Acceptance Criteria

  • An audit of a page with <a href="/cdn-cgi/l/email-protection#abcd">[email protected]</a> reports no broken internal link for it, at every level and with the internal link check on.
  • links/broken-links details include a count of Cloudflare email-protection links skipped when there were any.
  • The external link check never requests a /cdn-cgi/l/email-protection URL on another host.
  • A parser test covers the extraction of the obfuscated link as a contact affordance, and a rules test covers the skip.
  • docs/rules/links/broken-links.mdx says these links are skipped and why.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrulessize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions