Skip to content

links/no-contextual-inbound reports a URL that returns 404 as a page needing contextual links #1760

Closed

Description

@nc9

Reproduced on the public demo site nutshop.squirrelscan.com (repo squirrelscan/nut-shop) with its footer-broken-link fault on: the footer of every page links to /gift-guide-2026, which returns 404.

The audit reports the same URL twice:

  • links/broken-links fail: "1 broken internal link(s)", /gift-guide-2026 (404), linked in the footer. Correct.
  • links/no-contextual-inbound warn: "1 page(s) are linked only from sitewide chrome", item https://nutshop.squirrelscan.com/gift-guide-2026, linked only from the footer.

The second finding is wrong. The URL is not a page, so it cannot need a contextual link, and the advice (add a link to it from body copy) would add another broken link. A triage agent reading the report wrote an issue telling the owner to add a contextual link to the guide once the destination is repaired.

Expected: links/no-contextual-inbound only reports URLs that resolved to an auditable page in this crawl.

Acceptance Criteria

  • A URL whose response is 4xx or 5xx is never reported by links/no-contextual-inbound.
  • A URL that was not fetched in this crawl (outside the page cap, blocked, timed out) is not reported either; the check says it could not judge those, with the shared not-checked reason.
  • A URL that redirects is judged at its final destination, not at the redirecting URL.
  • The same site with the footer link pointing at a real page that has no body-copy links still gets the warning (regression test for today's behaviour).
  • Tests cover: a 404 target linked only from the footer, a 410 target, a redirecting target, and a real page linked only from the footer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrulessize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions