By Rajesh Kannan, Co-Founder & CTO, Gramosoft · Last updated: · Code tested on a local test site with Python 3.13, requests 2.34.2 and Beautiful Soup 4.15.0 on November 24, 2026; tool versions checked on PyPI the same day
A broken link checker is a small web crawler with one job: visit every page on your site, collect every link and report the ones that fail. If you need a full crawler for other work, start with our list of the best open-source web crawlers. This guide covers the narrower task of finding broken links with Python. It starts with GcrawlAI, which renders each page in a real browser so links added by JavaScript are checked too, then builds a complete Python checker you can run for free, tests it against the snippet most tutorials use, and shows how to fix what it finds.
TL;DR
- JavaScript sites: GcrawlAI's crawl renders every page in a real browser and returns the HTML, so links that scripts add are checked too. One request per page, failed pages never charged, 50 free requests a month.
- Any site, free: our
find_broken_links.pycrawls your own pages, checks each link once (HEAD, then GET), retries 429 and 5xx, and writes a CSV with the page and anchor text of every problem. - What we found: on a test site with 8 real link problems, the common "anything but 200 is broken" snippet caught 5 and raised 5 false alarms. Our checker caught 7 with no false alarms, and all 8 on rendered pages.
- Not every non-200 is broken: 404, 410 and dead hosts are broken; 403, 429 and 999 usually mean "not for scripts"; redirects work but should be updated.
How do you find broken links on a website with Python? Crawl your own pages, collect every link with requests and Beautiful Soup, and check each unique URL with a HEAD request, falling back to GET. Treat 404, 410 and unreachable hosts as broken, retry 429 and 5xx, check 403s by hand, and render JavaScript pages before you collect their links.
Find broken links on JavaScript sites with GcrawlAI
GcrawlAI's crawl endpoint loads every page of your site in a real browser through a residential IP, waits for scripts and lazy content, and returns the rendered HTML. Run the link checker below on that HTML and you also catch the links a script adds after the page loads, which plain Python requests never sees.
The script asks GcrawlAI for the rendered pages, then hands them to the same audit() function the free version uses, so the checking logic and the report are identical. Rendering costs one request per page; the link status checks run on your own machine and cost nothing.
gcrawl_broken_links.py
"""Find broken links on JavaScript-built sites: GcrawlAI renders every page in a real browser,
then the same checker runs on the rendered HTML, so links that scripts add are checked too.
pip install gcrawl-sdk requests beautifulsoup4
export GCRAWL_API_KEY=gc-YOUR_API_KEY
python gcrawl_broken_links.py https://example.com/ 100
"""
import os
import sys
from gcrawl_sdk import CrawlOptions, GcrawlClient
from find_broken_links import audit, report
def rendered_pages(client, start, max_pages=100, geo="US"):
"""One GcrawlAI request per page: rendered HTML for every page on the site."""
job = client.crawl(
start,
options=CrawlOptions(max_pages=max_pages, same_domain_only=True, include_subdomains=False,
proxy_geo=geo, markdown_enabled=False, html_enabled=True, auto_scroll=True),
wait=True,
)
if not job.is_completed:
raise SystemExit(f"crawl did not finish: {job.status}")
pages = {p.url: p.html for p in job.pages if p.url and p.html}
print(f"{len(pages)} pages rendered ({job.pages_failed or 0} failed; failed pages are not charged)")
return pages
if __name__ == "__main__":
site = sys.argv[1] if len(sys.argv) > 1 else "https://example.com/"
limit = int(sys.argv[2]) if len(sys.argv) > 2 else 100
client = GcrawlClient(api_key=os.environ.get("GCRAWL_API_KEY", "gc-YOUR_API_KEY"))
pages = rendered_pages(client, site, limit)
report(*audit(site, limit, pages_html=pages), "broken_links.csv")
- Rendered, not just downloaded: every page loads in a real browser with
auto_scroll, so menus, product grids and "load more" lists built by JavaScript are part of the HTML you check. - Your whole site in one call:
max_pages,same_domain_onlyandinclude_subdomainscontrol the crawl; use map first if you only want the list of URLs. - Gets past bot checks on your own CDN: rotating residential IPs and stealth escalation for Cloudflare, DataDome and PerimeterX are inside the same request, which matters when your own site's protection blocks your audit script.
- Country you choose:
proxy_geoloads pages from a given country, useful when links differ by region. - How you connect: the managed Cloud API, the Python SDK, MCP for AI agents, the Playground, or the MIT-licensed core on your own servers.
- Billing: one request per rendered page, whatever proxies or retries it needs. Failed pages are never charged. 50 free requests a month with no card, then $0.67 to $9.67 per 1,000.
Where it falls short: for a static site, the free script below does the whole job and GcrawlAI adds nothing. There's no built-in "broken links report" endpoint yet; GcrawlAI supplies rendered pages and your code does the checking. External links are still checked from your machine, so a site that blocks scripts still shows up as "blocked" rather than "fine". Self-hosting the open-source core means bringing your own proxy accounts.
"Most broken link reports are long because they're wrong. Half of what a naive script flags is a redirect, a rate limit or a bot check. Sort first, then fix."
Rajesh Kannan, Co-Founder & CTO at Gramosoft
What counts as a broken link, and what doesn't
A link is broken when the page it points to no longer exists or can't be reached: a 404 or 410 status, a server that keeps failing, or a host that doesn't resolve. Many other responses look like errors but aren't. A 403 or 429 usually means the site refuses scripts, and a redirect still works.
| Response | What it means | Category | What to do |
|---|---|---|---|
| 404 Not Found, 410 Gone | The page doesn't exist | Broken | Update or remove the link, or add a redirect |
| DNS failure, connection refused | The host is gone or down | Dead host | Recheck tomorrow; remove the link if it persists |
| 200 with a "page not found" page | A soft 404: the server says OK, the page says missing | Soft 404 | Fix the target page or the link |
200, but #section isn't on the page |
The page works, the anchor doesn't | Missing anchor | Point the link at an id that exists |
| 500, 502, 503, 504 after retries | The server is failing | Server error | Retry later; tell the site owner if it's yours |
| 401, 403, 429, 999 | The site won't answer a script | Blocked | Open it in a browser before you call it broken |
| 301 or 308, or 2+ redirects | The link works but has moved | Update link | Point the link straight at the final URL |
Google treats soft 404s and repeated server or DNS errors as real problems, which is why they belong in the report (Google Search Central). A 403 on someone else's site is different: it tells you about their bot protection, not about the page, so it needs a human check. Our guides to 403 Forbidden errors and 429 Too Many Requests explain those codes in depth.
A Python script that finds broken links on a whole site
This script crawls one site, collects every link from a, img, script, link, source and iframe tags, checks each unique URL once, and sorts the results into the categories above. It writes a CSV with the source page and anchor text, so you know exactly where each fix goes.
find_broken_links.py
"""Find broken links on a website with Python: crawl your own pages, check every link once,
and sort the results into what actually needs fixing.
pip install requests beautifulsoup4
python find_broken_links.py https://example.com/ --max-pages 200 --csv broken_links.csv
"""
import argparse
import csv
import re
import threading
import time
from collections import deque
from concurrent.futures import ThreadPoolExecutor
from urllib.parse import urldefrag, urljoin, urlparse
from urllib.robotparser import RobotFileParser
import requests
from bs4 import BeautifulSoup
UA = "Mozilla/5.0 (compatible; LinkAudit/1.0; +https://example.com/bot)" # say who you are
TIMEOUT = 15
RETRY_CODES = {429, 500, 502, 503, 504}
BLOCKED_CODES = {401, 403, 999} # "you may not", not "it doesn't exist"
SOFT_404 = re.compile(r"\b(404|not found|page not found|no longer available|couldn.t find)\b", re.I)
LINK_TAGS = {"a": "href", "img": "src", "script": "src", "link": "href", "source": "src", "iframe": "src"}
_local = threading.local()
_host_locks = {}
def session():
if not hasattr(_local, "s"):
_local.s = requests.Session()
_local.s.headers.update({"User-Agent": UA, "Accept": "*/*"})
return _local.s
def host_lock(url):
"""At most two requests at a time per host, so a link audit never hammers anyone's server."""
return _host_locks.setdefault(urlparse(url).netloc, threading.Semaphore(2))
def fetch(url, method="HEAD", tries=3, delay=0.2):
"""Request a URL, follow redirects, retry 429/5xx politely. Returns (response or None, error)."""
for attempt in range(tries):
try:
with host_lock(url):
time.sleep(delay)
r = session().request(method, url, allow_redirects=True, timeout=TIMEOUT, stream=True)
r.close()
except requests.exceptions.ConnectionError as e:
if "Name or service not known" in str(e) or "NameResolution" in str(e) or "getaddrinfo" in str(e):
return None, "dns"
if attempt == tries - 1:
return None, "connection"
except requests.exceptions.Timeout:
if attempt == tries - 1:
return None, "timeout"
else:
if r.status_code not in RETRY_CODES or attempt == tries - 1:
return r, None
wait = r.headers.get("Retry-After", "")
time.sleep(min(int(wait), 30) if wait.isdigit() else 2 ** attempt)
continue
time.sleep(2 ** attempt)
return None, "connection"
def check_link(url):
"""Check one URL. HEAD first (cheap); GET when the server refuses or fumbles HEAD."""
r, err = fetch(url, "HEAD")
if r is not None and r.status_code >= 400 and r.status_code not in RETRY_CODES:
r, err = fetch(url, "GET") # many servers answer HEAD with 403/404/405 wrongly
if err:
return {"category": "DEAD HOST" if err in ("dns", "connection") else "TIMEOUT",
"status": err, "final_url": "", "hops": 0}
code, hops = r.status_code, len(r.history)
if code in (404, 410):
category = "BROKEN"
elif code in BLOCKED_CODES or code == 429:
category = "BLOCKED (check by hand)"
elif code >= 500:
category = "SERVER ERROR"
elif code >= 400:
category = "BROKEN"
elif hops >= 2:
category = "REDIRECT CHAIN (update link)"
elif hops == 1 and r.history[0].status_code in (301, 308):
category = "MOVED (update link)"
else:
category = "OK"
return {"category": category, "status": code, "final_url": r.url if hops else "", "hops": hops}
def extract(page_url, html):
"""Every link on a page with its tag, anchor text and #fragment."""
soup = BeautifulSoup(html, "html.parser")
ids = {t.get("id") for t in soup.find_all(id=True)} | {t.get("name") for t in soup.find_all("a", attrs={"name": True})}
title = (soup.title.get_text(strip=True) if soup.title else "") + " " + " ".join(h.get_text(" ", strip=True) for h in soup.find_all("h1"))
out = []
for tag, attr in LINK_TAGS.items():
for el in soup.find_all(tag):
raw = el.get(attr)
if not raw or raw.startswith(("mailto:", "tel:", "javascript:", "data:")):
continue
url, frag = urldefrag(urljoin(page_url, raw.strip()))
if urlparse(url).scheme in ("http", "https"):
text = el.get_text(" ", strip=True) or el.get("alt", "") or el.get("title", "")
out.append({"url": url, "fragment": frag, "tag": tag, "text": text[:80], "source": page_url})
return out, ids, title
def crawl(start, max_pages=200, respect_robots=True, pages_html=None):
"""Breadth-first crawl of one host. pages_html lets you pass rendered HTML instead (see the GcrawlAI script)."""
host = urlparse(start).netloc
robots = RobotFileParser(urljoin(start, "/robots.txt"))
try:
robots.read()
except Exception:
robots = None
seen, queue, found, page_ids, soft = {start}, deque([start]), [], {}, set()
while queue and len(page_ids) < max_pages:
url = queue.popleft()
if respect_robots and robots and not robots.can_fetch(UA, url):
continue
html = (pages_html or {}).get(url)
if html is None:
try:
r = session().get(url, timeout=TIMEOUT)
except requests.RequestException:
continue # check_link() reports it if a page links here
if r.status_code >= 400 or "html" not in r.headers.get("Content-Type", ""):
continue
html = r.text
links, ids, title = extract(url, html)
page_ids[url] = ids
if SOFT_404.search(title):
soft.add(url)
found += links
for link in links:
if link["tag"] == "a" and urlparse(link["url"]).netloc == host and link["url"] not in seen:
seen.add(link["url"])
queue.append(link["url"])
return found, page_ids, soft
def audit(start, max_pages=200, workers=16, pages_html=None):
found, page_ids, soft = crawl(start, max_pages, pages_html=pages_html)
unique = sorted({f["url"] for f in found})
with ThreadPoolExecutor(workers) as pool: # each URL is checked once, however many pages use it
results = dict(zip(unique, pool.map(check_link, unique)))
rows = []
for f in found:
res = dict(results[f["url"]])
if f["url"] in soft and res["category"] == "OK":
res["category"] = "SOFT 404"
if f["fragment"] and f["url"] in page_ids and f["fragment"] not in page_ids[f["url"]]:
res["category"] = "MISSING ANCHOR"
if res["category"] != "OK":
rows.append({**f, **res, "url": f["url"] + ("#" + f["fragment"] if f["fragment"] else "")})
return rows, len(page_ids), len(unique)
def report(rows, pages, links, path=None):
order = ["BROKEN", "DEAD HOST", "SOFT 404", "MISSING ANCHOR", "SERVER ERROR", "TIMEOUT",
"BLOCKED (check by hand)", "REDIRECT CHAIN (update link)", "MOVED (update link)"]
print(f"{pages} pages crawled, {links} unique links checked, {len(rows)} problems")
for cat in order:
hits = [r for r in rows if r["category"] == cat]
for r in sorted(hits, key=lambda r: (r["url"], r["source"])):
src = urlparse(r["source"])
shown = r["url"].replace(f"{src.scheme}://{src.netloc}", "") # same-site links as paths
print(f" {cat:29} {str(r['status']):10} {shown:34} on {src.path or '/'}"
f" [{r['tag']}: {r['text'] or '-'}]")
if path:
with open(path, "w", newline="") as f:
w = csv.DictWriter(f, ["category", "status", "url", "final_url", "hops", "source", "tag", "text"],
extrasaction="ignore")
w.writeheader()
w.writerows(rows)
if __name__ == "__main__":
ap = argparse.ArgumentParser()
ap.add_argument("start")
ap.add_argument("--max-pages", type=int, default=200)
ap.add_argument("--csv", default="broken_links.csv")
a = ap.parse_args()
report(*audit(a.start, a.max_pages), a.csv)
The details that make the difference:
- Check each URL once. A footer link appears on every page; checking it 500 times wastes time and hammers the server. The script checks unique URLs, then maps results back to every page that uses them.
- HEAD first, GET on failure. HEAD skips the body, so it's fast. HTTP requires general-purpose servers to support it (RFC 9110), but many answer HEAD with 403, 404 or 405 anyway, so a failed HEAD gets one GET before it's reported.
- Retry what's temporary. 429 and 5xx responses are retried up to three times, waiting for
Retry-Afterwhen the server sends it. - Stay polite. At most two requests at a time per host, with a short delay, an honest User-Agent and robots.txt respected for your crawl. The script only crawls the start host; external links are checked, never crawled.
- Catch what status codes miss. Pages whose title or heading says "not found" are reported as soft 404s, and
#fragmentlinks are checked against the ids on the target page.
For thousands of URLs, the same structure works with aiohttp or an async httpx client instead of threads; our comparison of requests vs httpx vs aiohttp shows where each one is faster.
We tested it: the common snippet vs a proper checker
We built a 13-page test site with 8 real link problems and 7 traps that look broken but aren't. Then we ran the snippet most tutorials use (HEAD every link, flag anything but 200), our checker on the server's HTML, and our checker on rendered pages. Every number below comes from that run on November 24, 2026.
| Checker | Real problems found (of 8) | False alarms | Missed |
|---|---|---|---|
| Naive snippet (HEAD, not 200 = broken) | 5 | 5: two redirects, a HEAD-refusing server, a rate limit, a flaky server (plus 2 blocked links reported as broken) | Soft 404, missing anchor, JavaScript link |
find_broken_links.py |
7 | 0 (two 403/999 links flagged "check by hand") | The link added by JavaScript |
find_broken_links.py on rendered pages |
8 | 0 | None |
lab_output.txt (printed output)
== Naive snippet (HEAD, anything but 200 is broken): 21 links, 12 flagged flagged /blog/2023-recap flagged /chain-1 flagged /docs flagged /feed flagged /files/brochure.pdf flagged /img/hero.png flagged /members flagged /old-pricing flagged /social flagged /status flagged http://127.0.0.1:8809/ flagged http://shop.acme-tools.invalid/ == find_broken_links.py on the HTML the server sends 11 pages crawled, 21 unique links checked, 11 problems BROKEN 410 /blog/2023-recap on /blog/ [a: 2023 recap] BROKEN 404 /files/brochure.pdf on /about [a: brochure] BROKEN 404 /img/hero.png on / [img: hero] DEAD HOST connection http://127.0.0.1:8809/ on / [a: old partner site] DEAD HOST dns http://shop.acme-tools.invalid/ on / [a: shop] SOFT 404 200 /reports/q3 on /blog/ [a: Q3 report] MISSING ANCHOR 200 /about#team on / [a: Meet the team] BLOCKED (check by hand) 403 /members on / [a: members area] BLOCKED (check by hand) 999 /social on / [a: our social page] REDIRECT CHAIN (update link) 200 /chain-1 on / [a: 2024 report] MOVED (update link) 200 /old-pricing on / [a: our pricing] == find_broken_links.py on rendered pages (stub crawl, see stub_gcrawl.py) 13 pages rendered (0 failed; failed pages are not charged) 13 pages crawled, 24 unique links checked, 12 problems BROKEN 410 /blog/2023-recap on /blog/ [a: 2023 recap] BROKEN 404 /files/brochure.pdf on /about [a: brochure] BROKEN 404 /img/hero.png on / [img: hero] BROKEN 404 /p/42 on /products [a: Saw] DEAD HOST connection http://127.0.0.1:8809/ on / [a: old partner site] DEAD HOST dns http://shop.acme-tools.invalid/ on / [a: shop] SOFT 404 200 /reports/q3 on /blog/ [a: Q3 report] MISSING ANCHOR 200 /about#team on / [a: Meet the team] BLOCKED (check by hand) 403 /members on / [a: members area] BLOCKED (check by hand) 999 /social on / [a: our social page] REDIRECT CHAIN (update link) 200 /chain-1 on / [a: 2024 report] MOVED (update link) 200 /old-pricing on / [a: our pricing]
Two honest notes. First, this is a small local site built to contain each failure once, so it shows which problems each approach can see, not how often they occur on real sites. Second, we couldn't call GcrawlAI's API from our test machine, so the rendered run used a stand-in that renders pages with a local Chromium and returns the same fields (it's in the code download). It shows what rendering changes, not GcrawlAI's own output.
Other Python tools for checking links
You don't have to write your own checker. LinkChecker is a mature command-line tool, advertools fits SEO work in pandas, and Selenium renders JavaScript at the cost of speed. Most guides still recommend pylinkvalidator, which hasn't had a release since 2015. Here's how they compare.
| Tool | Version and licence | Renders JavaScript | Best for |
|---|---|---|---|
GcrawlAI + find_broken_links.py |
gcrawl-sdk 0.5.9, MIT core and SDK | Yes, real browser per page | JavaScript sites, protected sites, scheduled audits |
find_broken_links.py alone |
This guide, free | No | Static sites, CI checks, custom reports |
| LinkChecker | 10.6.0, GPL-2.0 or later | No | A ready-made CLI with CSV, HTML and sitemap output |
| advertools | 0.18.0, MIT | No | SEO audits in pandas: crawl file, link map, HEAD checks |
| Selenium + requests | 4.54.0, Apache-2.0 | Yes, one local browser | A few JavaScript pages you can render yourself |
| pylinkvalidator | 0.3 (August 2015), BSD | No | Old scripts that already use it |
LinkChecker is free GPL software that checks pages recursively with multiple threads, honours robots.txt and writes text, HTML, CSV or XML reports (LinkChecker). advertools crawls a site to a file, maps every link with crawlytics.links and checks external URLs with HEAD-only crawl_headers. Selenium sees JavaScript links but runs one full browser on your machine, which gets slow past a few hundred pages; for why, see our guide to JavaScript-heavy sites.
How to fix broken links once you find them
Fix broken links at the source page, not at the target. The CSV gives you the page, the anchor text and the category, so each fix is a quick edit: point the link at the right page, add a redirect for pages you moved, or remove the link. Then rerun the check to confirm it's clean.
| Category | Fix |
|---|---|
| Broken, your own page | Add a 301 redirect from the old URL to the closest live page, then update the links that point to it |
| Broken, someone else's page | Link to the new location, a reliable archive copy, or remove the link |
| Soft 404 | Return a real 404 or 410 for missing pages, or restore the content |
| Missing anchor | Add the id to the target heading, or change the link's #fragment |
| Redirect chain or moved | Replace the link with the final URL so visitors and crawlers skip the hops |
| Blocked or server error | Open it in a browser; fix or remove only if it's really down |
Run the check on a schedule: weekly for a busy site, monthly for a small one, and after every redesign or URL change. A cron job or CI step that runs the script and fails when the "Broken" count isn't zero stops new broken links before they go live. To find every URL first, see how to crawl an entire website.
What checking links costs with GcrawlAI
Checking link status costs nothing: it runs on your machine with plain HTTP. GcrawlAI is only used to render pages, at one request per page, and failed pages are never charged. For a static site you don't need it at all; for JavaScript sites, a few examples show what a plan covers.
- A one-off audit of a 40-page JavaScript site: 40 requests, inside the free 50 a month.
- A weekly audit of a 500-page site: about 2,170 requests a month, inside Starter's 3,000.
- Monthly audits for 30 client sites of 400 pages each: 12,000 requests, inside Growth's 50,000.
| Plan | Price | Requests/month | Concurrent | Per 1,000 | Overage per 1,000 |
|---|---|---|---|---|---|
| Free | $0, no card | 50 | 2 | – | – |
| Starter | $29 | 3,000 | 5 | $9.67 | $10.83 |
| Growth | $79 | 50,000 | 15 | $1.58 | $1.77 |
| Pro | $199 | 150,000 | 25 | $1.33 | $1.49 |
| Scale | $499 | 750,000 | 50 | $0.67 | $0.75 |
| Enterprise | Volume pricing | 2M+ | 300+ | – | – |
| Self-hosted | $0 (MIT) | Your servers | Your workers | Infrastructure only | – |
Annual billing charges 10 months for 12, unused requests on paid plans roll over to the next billing period, and Indian customers are billed in INR with a GST invoice (INR prices exclude 18% GST). See pricing.
Checking links politely and legally
Crawl only sites you own or have permission to audit, and only check, never crawl, the external sites you link to. Respect robots.txt for your crawl, limit concurrent requests per host, send a User-Agent that says who you are, and back off when a server answers 429 or 503.
A link checker reads public pages and doesn't need to sign in, so it shouldn't bypass logins or paywalls; a link behind a login is "blocked", not broken. Our guide to checking robots.txt covers the rules, and What Is Web Scraping? How It Works, Uses & Legality covers the wider picture. This isn't legal advice.
Which broken link checker should you use?
Choose by how the site is built and how often you check it. A static site needs only the free script or LinkChecker. A JavaScript site needs rendered pages, or you'll miss the links scripts add. Scheduled audits across many sites need an API you can call from a job. GcrawlAI fits every row.
| If you need… | Use | Where GcrawlAI fits |
|---|---|---|
| A quick check of a static site | find_broken_links.py or LinkChecker |
Not needed; add it if pages come out thin |
| A React, Vue, Webflow or Wix site | Rendered pages, then the checker | Crawl renders every page in a real browser |
| A site behind Cloudflare or similar | Residential IPs and stealth for your own audit | Included in every crawl request |
| Weekly audits of many client sites | An API you can schedule | Python SDK, async jobs and webhooks |
| A link report in pandas for SEO | advertools | Feed it rendered HTML from GcrawlAI for JavaScript pages |
| Links checked inside an AI agent | A tool the agent can call | MCP server for AI agents |
"A broken link check belongs in your release process, not your quarterly to-do list. Run it on every deploy and fail the build when something real breaks."
Rajesh Kannan, Co-Founder & CTO at Gramosoft
Frequently asked questions
How do I find broken links on a website with Python?
Crawl your own pages with requests and Beautiful Soup, collect every link, and check each unique URL with HEAD, falling back to GET. Report 404, 410 and unreachable hosts as broken, retry 429 and 5xx, and check 403s by hand. For JavaScript sites, render pages first with a tool such as GcrawlAI.
Is a 403 or 429 response a broken link?
Usually not. A 403 often means the site blocks scripts or needs a login, and a 429 means you sent too many requests. Both can load fine in a browser. Retry 429 after the Retry-After delay, and open 403 links in a browser before you remove them from your site.
Should I use HEAD or GET to check links?
Use HEAD first because it skips the page body and is much faster. Some servers answer HEAD with 403, 404 or 405 even when the page exists, so send one GET before you report a link as broken. In our test, a HEAD-only check wrongly flagged a working docs page.
What is a soft 404?
A soft 404 is a page that returns status 200 but tells the visitor the page doesn't exist, such as "Sorry, we couldn't find that page". Status codes alone miss it. Our script flags pages whose title or main heading says "not found", and Google reports soft 404s in Search Console.
How do I find broken links on a JavaScript website?
Render each page in a real browser before collecting links, because requests only sees the HTML the server sends. Selenium or Playwright works for a few pages. GcrawlAI's crawl returns rendered HTML for a whole site in one call, and the same checker runs on it unchanged.
Is GcrawlAI open source, and what does a link audit cost?
Yes, the core is MIT-licensed and self-hostable, with a managed Cloud API, Python SDK and MCP server. Rendering costs one request per page, link status checks run free on your machine, and failed pages are never charged. You get 50 free requests a month, then $0.67 to $9.67 per 1,000.
How often should I check my site for broken links?
Weekly for a large or frequently updated site, monthly for a small one, and after every redesign, migration or URL change. The best option is a CI step that runs the checker on every deploy and fails the build when the count of real broken links is above zero.
Related guides
- Best Open-Source Web Crawlers in 2026 (Self-Hosted)
- How to Crawl an Entire Website: Sitemap and Link Discovery
- Best Web Crawler Software in 2026: Fastest Tools Compared
- Web Scraping vs Web Crawling: What's the Difference?
- Best Python HTTP Clients for Scraping: requests vs httpx vs aiohttp
- How to Scrape Dynamic JavaScript Websites with Python (2026 Guide)
- How to Check if a Website Allows Scraping (robots.txt Explained)
- Fix 405 Method Not Allowed and 500 Errors in Web Scraping
- How Websites Detect Scrapers: 13 Signals Anti-Bot Systems Check