Find broken links with Claude Code
Get a plain list of broken links, missing page titles and duplicate titles on your website, from a checker Claude Code writes for you.
For owners with a small business website · Claude Code · Intermediate
Tested Nov 17, 2026Claude Code in a cloud session, made-up 7-page site, passed with snags: with no sitemap the 2 broken pages were listed twice.See the receipt
Copy the prompt
Fill in the [brackets] after you paste it.
My website is [YOUR WEBSITE ADDRESS]. Write a small script in this folder that checks it, then run it.
The script should:
1. Read the sitemap (try /sitemap.xml, then /sitemap_index.xml). If there is none, start from the home page and follow links on my own domain only, up to 200 pages.
2. Visit each page at most once, one at a time, with a short pause between requests.
3. On each page, record: the page address, its status code, its title, and every link on the page.
4. Check each link on my own domain and record any that do not load (status 400 or higher).
5. Write report.csv with: page, problem (broken link, missing title, duplicate title, page error), detail, and how to fix it in plain words.
Rules: only read public pages. Do not log in, submit forms or change anything. Do not check links to other websites unless I ask. When done, show me the count of each problem and the 10 worst pages.Copied. Paste it into Claude Code next.
Free PDF
Get this setup as a PDF
Enter your email and a print-ready copy of this setup opens here, to save as a PDF. The free starter pack opens too. Tap confirm in the email that follows to get occasional new setups. Unsubscribe anytime.
Already a subscriber? Unlock it on this device
Free PDF
A confirmation email is on its way too: tap confirm in it to get new setups by email.
Three ways to run this setup
Free
Copy and paste it yourself
Copy the prompt above into ChatGPT, Claude or Grok. It drafts. You approve.
Go to the prompt$9 once
Complete Pack
One payment, no membership. Opens the pack pages: Bot Safety Checklist, Second Brain Starter Vault, Voice File Starter, Tested Grok Bot prompt pack, Write it as code prompts.
See the Complete PackFree to start, VIP $19 a month
Save it as a bot in the guided setup app
The app turns this setup into a bot with the draft-only rules. 3 setups build free; the rest are part of VIP. A human reviews a prompt or setup for you within 24 hours, up to 2 a month.
Build it in the app
What you get back
Example written for this page with made-up names. Not from a test run.
- Checked 64 pages from sitemap.xml. Broken links: 5. Missing titles: 2. Duplicate titles: 9.
- /services/ | broken link | links to /furnace-repair (404) | Update the link to /services/furnace-repair/ or remove it.
- /blog/page/2/ and /blog/page/3/ | duplicate title | both "Blog | Ortiz Heating" | Give archive pages a page number in the title.
3 steps
- Copy the prompt.
- Paste it into Claude Code.
- Fill in the [brackets], then read the answer before you send or use it.
Quick answer
Open Claude Code in an empty folder and paste the prompt below with your website address. It writes a small checker that reads your sitemap, visits each page, and makes a report of broken links, pages with no title, and pages that share the same title. The prompt tells it to only read your public pages and change nothing. Fix the problems in your website builder, then run the check again.
How do you set it up?
Skip this if
- Your website builder already shows a broken link report you check.
- Your site has no sitemap and only a handful of pages. Click through them yourself.
Done after day one
A report of every broken link and title problem, sorted by page, and a checker you can rerun after fixes.
Tools
- Claude Code, in the terminal or the desktop app
- Your website address (most builders publish a sitemap at /sitemap.xml)
- Your website builder, to make the fixes yourself
Steps
- Make an empty folder and open Claude Code in it in Manual mode (cd into the folder, then type claude --permission-mode manual).
- Paste the prompt below with your website address. In Manual mode, Claude Code asks before it edits files or runs commands; approve after you read what it will do.
- Open report.csv. Start with broken links (404) on your own site, then pages with no title, then duplicate titles.
- Fix each one in your website builder: update or remove the broken link, and give each page its own short, descriptive title.
- Run the check again and confirm the list is shorter. Rerun it once a month or after big changes.
Where to paste this prompt
Claude Code → terminal, IDE extension, or web session in your project directory
More ways to run it
Which chat tools work with this prompt?
Paste the prompt into any of these assistants (free or paid tiers).
- Claude Code
The receipt
Ran with Claude Code in a cloud session, Nov 17, 2026, on a made-up 7-page site on a local server: the checker found the 2 broken links and the 2 missing titles. It passed with snags: with no sitemap it listed the 2 broken pages twice, and the same session built the site and the checker. A real website, Manual mode and fixing then rerunning were not tested.
What this sticker meansLast updated: · Last reviewed:
Before you use this
Who it is for: Owners with a small business website who suspect it has broken pages or messy titles and do not want to pay for an audit tool to find out.
What it is allowed to do: Read-only. Only reads, researches, or summarizes. It never drafts outbound content or changes anything.
At a glance: time, cost and difficulty
At a glance
All outcome figures are estimates from cited sources, not independent verification by us.
- What it is allowed to do
- Read-only
Only reads, researches, or summarizes. It never drafts outbound content or changes anything.
- Time saved (estimate)
- Not measured yet
- Difficulty
- Intermediate
- Tools needed
- Claude Code
- Typical cost
- Claude Code needs a paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account. The check runs on your own computer. Plan prices: see claude.com/pricing.
Reviewed Nov 9, 2026
Basis (estimate): Not measured yet. We haven't timed this.
What went wrong in the test, and the rule that fixed it
Where agents tend to stall on this job. More patterns in Where AI gets stuck.
- The site blocks the checker. Ask Claude Code to slow it down further, or check fewer pages.
- Hundreds of "duplicate title" rows from blog tag or archive pages. Ask it to group them so you fix the template once.
- A link works in your browser but shows as broken. Open it yourself before you change anything.
- With no sitemap, a broken link can show up twice in the report, once as a broken link and once as a page error. Count the broken addresses, not the rows.
What tips make it smoother?
- Fix broken links on your most visited pages first: home, services and contact.
- Ask Claude Code to add a column for pages with a very short title, like just your business name.
- Keep the folder. Next month, ask Claude Code to rerun the script and compare with the old report.
Where do the claims come from?
Summaries use public sources linked below, not independent verification. How setups are picked.
- Read Anthropic’s write-up (code.claude.com)
Anthropic: Claude Code quickstart (read Nov 9, 2026): install commands for macOS, Linux, WSL and Windows, a desktop app option, plans that include it (Pro, Max, Ultra, Team or Enterprise, or a Claude Console account), start it with "cd" into a folder then "claude". Whether it asks before acting depends on the permission mode (see the permission modes page).
- Read Anthropic’s write-up (code.claude.com)
Anthropic: Claude Code permission modes (read Nov 9, 2026): in Manual mode Claude Code stops and asks before most actions that edit files, run shell commands or reach the network; auto mode is the built-in starting mode for interactive terminal and VS Code sessions on current versions; start in Manual with claude --permission-mode manual, or switch with Shift+Tab.
- Read Google Search Central’s write-up (developers.google.com)
Google Search Central: Influencing your title links in search results. Our build machine could not open Google developer pages; checked through search results on Nov 9, 2026: every page should have a descriptive title element, and missing, half-empty or repeated boilerplate titles are common reasons Google replaces a title.
Common questions
- What does this setup do?
- Open Claude Code in an empty folder and paste the prompt below with your website address. It writes a small checker that reads your sitemap, visits each page, and makes a report of broken links, pages with no title, and pages that share the same title. The prompt tells it to only read your public pages and change nothing. Fix the problems in your website builder, then run the check again.
- Who is it for?
- Owners with a small business website who suspect it has broken pages or messy titles and do not want to pay for an audit tool to find out.
- What does it cost to run?
- Claude Code needs a paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account. The check runs on your own computer. Plan prices: see claude.com/pricing.
- What usually goes wrong?
- The site blocks the checker. Ask Claude Code to slow it down further, or check fewer pages. Hundreds of "duplicate title" rows from blog tag or archive pages. Ask it to group them so you fix the template once.
- How much time might it save?
- Not stated in sources. Not measured yet. We haven't timed this.
Free kit by email
Get the free kit by email
The starter pack and the Portable AI Office, sent to your inbox. New setups by email after that. Unsubscribe any time.
What to do next
- Give your AI a map of your website
Write a one-file map of your website: pages, the search phrase each should rank for, and internal links.
- Make your website readable by AI
Check which AI crawlers your site allows, add an llms.txt file, and make sure your key pages read as plain text, then re-check with the free AI-ready check.
- Optimize your Google Business Profile to show up locally
Work through a one-time optimization pass on your free Google listing so it is complete, accurate, and review-active, with the AI drafting the description and review replies.
Have a setup that works? Submit it. We credit sources and write it up in plain language.