Home / Guides / How to Find Broken Links on a Website

Updated

How to Find Broken Links on a Website (and Which Errors Matter)

To find broken links, extract every <a href> from each page, request each target and keep those that answer 404, 410 or 5xx, or whose domain does not resolve. Treat 401, 403 and 429 as refused checks, not broken links, because many servers block automated checkers. Follow redirects but count them: internal links that redirect should point to the final URL. For a whole site, take the pages from its sitemap; for many sites, a bulk audit returns the broken links per page as JSON.

1. One page in a few lines

curl -s https://example.com/ | grep -o 'href="http[^"]*"' | cut -d'"' -f2 | sort -u \
  | while read u; do printf '%s %s\n' "$(curl -s -o /dev/null -w '%{http_code}' -L --max-time 8 "$u")" "$u"; done | grep -v '^[23]'

Good enough for a quick look; it misses relative links and treats a timeout (code 000) like a broken link.

2. Which answers really mean broken

Already have a list of URLs? See check HTTP status codes and redirects in bulk.

3. What real sites look like (measured 2 December 2026)

We ran our link checker on three well-maintained home pages, up to 50 links each: python.org/about 99 unique links, 50 checked, 0 broken, 8 redirected (3.1 s); docs.python.org/3 57 links, 50 checked, 0 broken, 2 redirected (0.9 s); djangoproject.com 46 links, all checked, 0 broken, 10 redirected (5.1 s). Even clean sites carry redirecting links: that is the first thing to fix.

4. A whole site or many sites

List the pages first (see find all pages of a website), then check each page. Plainprobe Website SEO & AI Audit does both in bulk: it reports up to 50 broken links per page with status codes (401/403/429 excluded), redirects, titles, canonicals and AI-crawler rules, with a score and a ranked fix list, at $0.003 per audited page.

Limits to keep in mind

FAQ

How do I find broken links on a website?

Fetch each page, extract every <a href>, request each target (a HEAD or a short GET) and keep those answering 404, 410, 5xx or failing DNS. For a whole site, start from the sitemap so you also reach pages that nothing links to.

Is a 403 or 429 a broken link?

Usually not. Many servers refuse automated checkers with 401, 403 or 429 while the page works fine in a browser. Report them separately instead of counting them as broken.

Do redirects hurt SEO?

A single redirect is harmless, but internal links that go through redirects waste crawl budget and slow visitors down. Update them to the final URL.

How often should I check for broken links?

After every site migration or URL change, and otherwise monthly. Outgoing links to other sites rot over time even when your own site does not change.

Related tool