Validate links in HTML files and report issues: broken links (404/500), redirects, slow responses, and affiliate link status.
VariableRequiredDefaultDescriptionSITE_DIRYes—Directory containing HTML files to scanLINK_CHECK_TIMEOUTNo10Max seconds to wait per linkAFFILIATE_DOMAINSNosee belowComma-separated affiliate domains to flag
Default affiliate domains: amazon.com,hostname/s/aspx,godaddy.com,bluehost.com,digitalocean.com,heroku.com,shopify.com,awin1.com,ref=
bash
./scripts/check.sh [directory]
Output: markdown report with broken links, redirects, slow links, and affiliate links found.
bash
./scripts/quick.sh [directory]
Only reports 4xx/5xx status links. Skips affiliate and slow link checks.
bash
./scripts/affiliate.sh [directory]
Lists all affiliate links and whether they're reachable. Critical for revenue site maintenance.
text
# Link Checker Report — [site name]
Generated: [timestamp]
## Summary
- Total links checked: N
- Broken: N 🔴
- Redirected: N 🟡
- Slow (>5s): N 🟠
- Affiliate: N ✅
## Broken Links (4xx/5xx) 🔴
[file] [line] [url] — [status]
## Redirects 🟡
[file] [url] → [destination]
## Slow Links (>5s) 🟠
[file] [url] — [response_time]
## Affiliate Links ✅
[file] [url]
bash
# Check all articles
SITE_DIR=./site ./scripts/check.sh
# Fast broken-link only
./scripts/quick.sh ./site/articles/
# Affiliate link audit
AFFILIATE_DOMAINS="amazon.com,digitalocean.com,bluehost.com" ./scripts/affiliate.sh ./site