Broken link checker with source and position

Find internal and external links to 4xx and 5xx URLs together with the page that links to them and the place in the template where the link sits.

What it does

Fix the template, not every page

Each broken destination lists the pages that link to it, with the link position such as content, navigation or footer. When the same broken link sits in a shared block, one template fix covers all those pages.

  • Source page for every broken link
  • Link position: content, navigation, footer and others
  • XPath of each link from the native crawl
  • Internal 4xx, internal 5xx and external broken links as separate checks

Link hygiene

Besides dead targets, the checks look at links that are technically wrong. A fragment that names no element on the destination page is reported, and so is a target=_blank link without noopener or noreferrer. Image links with neither anchor text nor alt text are reported because nothing tells a visitor where they go.

  • Fragments (#id) that point nowhere
  • Unsafe target=_blank links
  • Image links without text
  • Links with empty anchor text

One page or the whole site

links-check tests the links of one page live and prints the result at once. For the whole site, crawl-site walks the site from a start URL and keeps every link in a local scan that the audit reads. A link whose destination was not fetched is never called broken.

  • links-check for a single page, live
  • crawl-site for the full link graph
  • --internal-only to skip external links

Three steps, one saved scan

  1. Check one page or the whole site

    links-check tests the links on one page live. crawl-site walks the site from a start URL and stores the result for a full audit.

  2. See where each broken link sits

    In the native crawl, each broken link is listed with its source page, link position and XPath.

  3. Fix the shared block once

    Each broken destination lists every page that links to it, so a broken footer or menu link is fixed in one template.

Checks in this feature

CheckWhat it meansSeverityEvidence
BROKEN_INTERNAL_LINKInternal link points to a 4xx URLCriticalNative crawl: source page and link position (4xx destination)
LINK_TO_5XXInternal link points to a 5xx URLCriticalNative crawl: source page and link position (5xx destination)
BROKEN_EXTERNAL_LINKExternal link points to a broken (4xx or 5xx) URLImportantNative crawl: source page of the link (broken external target)
BROKEN_BOOKMARKLink fragment (#id) names no element on the destination pageImportantCrawl fragment check on retained page HTML
IMAGE_LINK_WITHOUT_TEXTImage link has neither anchor text nor alt text, so nothing says where it goesImportantCrawl link placement
UNSAFE_CROSS_ORIGIN_LINKtarget="_blank" link has no rel="noopener" or rel="noreferrer"ImportantCrawl link findings
Also in the check registry
INTERNAL_LINK_NO_ANCHOR

One command

bash
spiderhead links-check --url https://example.com/

Install first: installation guide. Every command also runs as an MCP tool for AI agents.

What you need

  • A page URL for links-check
  • A start URL for a crawl, or imported Inlinks exports for the audit path
  • No API keys

Limits

  • links-check covers one page and at most 200 unique targets by default
  • External 403 responses can be false alarms: some sites block crawlers on purpose
  • Redirects are listed, but chains and loops belong to the redirect checker
  • Links added by JavaScript may be missed unless the page is rendered

Questions

Do I need any other tool?
No. links-check works on one URL with no other tool, and crawl-site is SpiderHead's own crawler. Imported Inlinks exports are one more source of evidence for the audit, with link position and XPath. Without any link data, the link checks are skipped with a reason instead of coming back clean.
Does it check every link on the site?
links-check covers the links of the one URL you give it, with a default cap of 200 unique targets per page. For the whole site, crawl it and audit the scan.
Are 403 responses reported as broken?
Yes. A 4xx from an external site is reported as a broken external link. Some sites return 403 to crawlers on purpose, so check those links by hand before you remove them.
Does it follow redirects?
No. links-check lists redirects (3xx) separately, with their Location. Redirect chains and loops are covered by the redirect checker.
Does it change my site?
No. The checks send read-only requests. A crawl writes a local SQLite scan file on your machine, and the report is a file you keep.
Can it check anchor fragments like #pricing?
Yes. A fragment that names no element on the destination page is reported as a broken bookmark.

Try it on your own site