How to find broken links in five steps
To find broken links, crawl your site to collect every internal link and check your external links in bulk, recording each target's HTTP status. Sort the failures by cause and re-check the uncertain ones. Then fix, redirect or remove each link.
A link is broken when its target returns an error instead of the page. That means a 4xx or 5xx status code, or no HTTP response at all because DNS, TLS or the connection failed. Links that redirect still work, but long chains are worth fixing in the same pass.
Crawl your site to collect internal links
A crawler starts at your homepage, follows each link to another page on your domain, and records the status code of every URL it fetches. Its report lists each broken URL with the pages that link to it, which tells you where to make the fix.
A crawl finds only what is linked from the starting page within its depth and page limits. Pages behind a login, links added by JavaScript that the crawler doesn't run, and pages nothing links to won't appear. Check the URLs in your XML sitemap as a second list to cover what the crawl missed.
Crawl production rather than staging, since the two can differ in content and redirects.
Check the external links you know about
External links point to sites you don't control. They break when those sites move pages without redirects, let a domain expire or shut down.
Some crawlers record outbound links without requesting them, so build a separate list. Export the external URLs from the crawl or your CMS, remove duplicates, and run the list through a bulk URL checker that follows redirects to the final status.
Some sites block automated requests or require a login. A 401, 403 or 429 from another site often means the checker was refused, while the page itself is fine.
Sort the failures by cause
Group the results by status code or error type. Each cause has a different fix and a different level of certainty.
- 404 Not Found and 410 Gone: the page doesn't exist at that URL, and 410 says it was removed on purpose. These are real broken links.
- 500, 502, 503 and 504: the server or a gateway in front of it failed. These are often temporary, so re-check before acting.
- 401 Unauthorized and 403 Forbidden: the server refused the request. The page may need a login, or the site may block automated checkers.
- 429 Too Many Requests: you hit a rate limit. Slow down and check again later.
- DNS failures: the hostname doesn't resolve, often because the domain expired or the link contains a typo.
- TLS errors: the certificate is expired, untrusted or issued for another name. Browsers show visitors a warning, so treat the link as broken until the site fixes it.
- Timeouts and refused connections: the server didn't answer. It may be overloaded, down or blocking your checker.
Re-check the uncertain results
Temporary failures are common. A server restart, a rate limit or a brief network problem can make a working page fail once.
Re-check 5xx errors, 429s, timeouts and connection errors a few hours later, and open 401 and 403 results in a browser. Keep only the failures that repeat. A 404 or 410 you can reproduce needs no second round.
Look at the successful results too. A missing page that redirects to the homepage, or returns 200 with a 'page not found' message, is a soft 404. The link is broken for the reader even though the status code says it works.
Fix, redirect or remove each broken link
Fix links at their source. When the target moved, update the link to the new URL. If other sites also link to the old address, add a 301 redirect from it to the new page as well.
If the content is gone with no replacement, remove the link or point it to the closest relevant page, and let the old URL return 404 or 410. For an external page that moved, link to its new location; if it's gone, remove the link or cite another source.
Start with links in shared templates such as navigation and footers, since one fix repairs every page that uses them. Then work through your most visited pages, and crawl again after the fixes ship.