Link Rules
Link Rules
Rules for validating links and link structure.
broken-links
Checks all links for broken/invalid status codes.
Checks
- Internal links return 200
- External links are reachable
- No 404, 500, or other error codes
- Handles redirects (up to 10 hops)
Requires
Live checks enabled (default). Disable with --no-live.
Examples
Fail:
Pass:
Configuration
Disable for Static Analysis
redirect-chains
Detects chains of 2+ redirects.
Checks
- Links that redirect multiple times
- Recommends direct linking
Examples
Warning:
Better:
Why It Matters
- Slower page loads
- Lost link equity
- Poor user experience
Configuration
external-links
Validates external links with target="_blank" have rel="noopener".
Checks
target="_blank"links haverel="noopener"- Prevents security vulnerabilities
Examples
Fail:
Pass:
Why It Matters
Without rel="noopener", the opened page can access window.opener and potentially redirect your page.
Configuration
internal-links
Analyzes internal linking structure.
Checks
- Page has at least 3 internal links
- Warns if too few internal links
Examples
Warning:
Pass:
Why It Matters
Internal links help:
- Search engines discover pages
- Distribute page authority
- Improve user navigation
Configuration
Best Practices
Link Text Guidelines
| Good | Bad |
|---|---|
| "View our pricing plans" | "Click here" |
| "Read the full article" | "More" |
| "Download the PDF guide" | "Link" |
Security Checklist
- All
target="_blank"haverel="noopener" - No links to compromised domains
- HTTPS links where possible
Internal Linking
- Link to related content
- Use descriptive anchor text
- Include navigation links
- Add contextual links in content
Example Good Linking