squirrelscan
GitHub

Link audit rules: broken links, orphans and redirects

Audit rules for links: broken internal and external links, fragments that point at nothing, orphan and dead-end pages, redirects and anchor text.

Links rules read the link graph the crawl built. Half of them are health checks: internal and external targets that return an error, hrefs that do not parse, links that drop to plain HTTP, links that resolve only through a redirect. The other half describe structure: how many links point at a page, whether any of them sit in body copy rather than the footer, and whether the anchor text says what the destination is.

Run only these rules

squirrel audit https://example.com --rule-include links

Cloud dead-link checking runs only when you are signed in. Logged out, external links are checked from your machine instead.

Where to start

These carry the highest severity and weight in the category.

Rules

RuleWhat it flagsSeverityScope
Broken anchor links: #fragments that point at nothingA link to #pricing whose target id is gone still loads, and the reader lands at the top of the page. squirrel checks every in-page anchor against the element it names.warningSite-wide
Broken external links: link rot on pages you cannot fixExternal links die without warning when the other site changes. squirrel checks each one and separates dead links from unverifiable ones.warningSite-wide
Broken internal links: 404s inside your own siteAn internal link to a page that returns 404 or 500 is a dead end you control. squirrel cross-references every internal link against the crawl.errorSite-wide
Cloud dead-link checking: the shared external link cacheChecking every external link from your machine is slow and rude to the sites you link to. The cloud service checks against a shared cache instead.infoSite-wide
Dead-end page: no outgoing internal links to continue withA page with no onward links leaves the reader and the crawler with nowhere to go. squirrel counts outgoing internal links, excluding self-links.warningPer-page
Empty and generic anchor text: click here and iconsA link with no text has no name, and click here describes nothing. squirrel groups links by destination and checks each group for a descriptive name.warningPer-page
External link count: how many outbound links a page hasExternal links are normal and this rule does not penalise them. squirrel counts them per page so you can see where they concentrate.infoPer-page
Internal link count per page: too few and too manyA page with no internal links leads nowhere and a page with hundreds dilutes each one. squirrel counts internal links against a configurable range.warningPer-page
Invalid links: hrefs that do not parse as a URLA malformed href is a link that goes nowhere, and javascript:void(0) is a button wearing a link costume. squirrel reports every href the parser rejected.warningPer-page
Linked only from the nav and footer: no editorial linksA footer link on every page looks like hundreds of inbound links and carries none of the signal. squirrel counts only links outside sitewide chrome.warningSite-wide
Links from an HTTPS page to an http:// destinationA link that drops the visitor to plain HTTP hands their next request to the network. squirrel flags every explicit http:// link on an HTTPS page.warningPer-page
Links pointing at redirecting URLs: the hop on every clickAn internal link to a URL that redirects costs a round trip every time anyone follows it. squirrel finds redirecting pages and who links to them.warningSite-wide
Orphan pages: pages with too few inbound internal linksA page nothing links to is hard to discover and reads as unimportant. squirrel counts dofollow inbound internal links for every crawled page.warningSite-wide
Pages with only one internal link pointing to themOne inbound link is enough to be found and not enough to look important. squirrel lists every page whose dofollow inbound count is exactly one.warningSite-wide
rel=nofollow on an internal link: usually a mistakeNofollow on your own links tells search engines to ignore your site’s internal structure. squirrel flags every internal link carrying it.warningPer-page
tel: and mailto: links: format and href/text mismatchesA phone link whose href differs from the number on screen dials the wrong person. squirrel validates both formats and compares them with the visible text.infoPer-page

Internal link checks run at every audit level, Quick included, and are free. Each internal link target the crawl did not fetch gets a status-only request (up to 200 per audit, most-linked first), so a linked 404 is found even when the crawl did not follow links or ran out of page budget. It is built not to change anything on your site: it skips links that look like actions (log out, unsubscribe, delete, confirm, add to cart) or carry a token, sends no cookies, credentials or custom headers, and sends HEAD, never a GET unless the server does not support HEAD. See What the internal link check never requests.

External link checks run at every level, Quick included. Skip them with --no-external-links, [external_links] enabled = false, or the website’s External link checks setting in the cloud. An audit that checks them requests up to its page budget or 200 distinct external links, whichever is more, most-linked first. In a cloud audit, or a signed-in CLI audit at Surface or Full, each external link the cloud verifies costs 1 credit, at most one per page of the audit’s budget. Links checked on your machine are free, a Quick CLI audit’s included.

WhereExternal linksInternal links
One CLI run--external-links to check them, --no-external-links to skip them--no-internal-links to skip them
squirrel.toml[external_links] enabled = false to skip them[internal_links] enabled = false to skip them
A cloud websiteThe website’s External link checks settingThe website’s Internal link checks crawl setting

--offline skips external links, since it promises no requests beyond the audited site. A check that did not run is reported as Not checked with the reason, never as a pass.

Key terms

  • Anchor text: The visible, clickable text of a link, which tells readers and search engines what the target is about.
  • Broken link: A link whose target answers with an error, does not resolve, or is malformed.
  • Crawl budget: The number of URLs a search engine is willing and able to crawl on a site in a given time, set by crawl capacity and crawl demand.
  • Fragment link: A link to an id within a page (#section); it is broken when no element on the target page carries that id.
  • HTTP status code: The three-digit code a server returns with every response; 2xx success, 3xx redirect, 4xx client error, 5xx server error.
  • HTTPS: HTTP over TLS, which encrypts traffic and proves the server’s identity; every page and form should use it.
  • Internal linking: Links between pages of the same site, which carry crawlers and readers through it and signal which pages matter.
  • Orphan page: A page that no other crawled page links to, so crawlers and readers only reach it through a sitemap or a direct URL.
  • Redirect chain: A sequence of two or more redirects between the requested URL and the final response.
  • rel=nofollow: A link attribute value asking search engines not to associate the linking page with the target; a hint, not a block.

Crawlability checks the redirect chains and sitemaps that sit alongside the link graph. Images checks image sources, and Accessibility checks link text from a screen reader’s side.

Learn more

[rules]
disable = ["links/*"]

Type to search…

↑↓ navigate↵ openesc close