Skip to content

Fix Google indexing with Claude Code

Pages stuck on Crawled, currently not indexed or Discovered, currently not indexed? Connect CrawlCoach, and Claude Code fixes the cause in your code, then rechecks each page with Google.

Connect CrawlCoach in one command

In your site's project, run:

claude mcp add --transport http crawlcoach https://crawlcoach.com/mcp

Then get your free report with the Google account you use for Search Console. In Claude Code, type /mcp, choose crawlcoach, and choose Authenticate.

The free report covers up to 500 pages. The fix list starts at $29 a month.

Fix the pages Google left out

In your site's project, type:

/mcp__crawlcoach__fix_my_site

Claude Code groups the missing pages by Google's reason and fixes the template or setting behind each one. It asks you for facts it can't find, like prices or hours.

After the fix

  • On a paid plan, Claude Code rechecks the changed pages with Google right away, 25 at a time.
  • CrawlCoach checks them every day for 14 days.
  • Each fix closes by itself once Google indexes the page.

CarScout worked through 73 fixes from its fix lists and grew from 987 Google clicks in September to 1,431 in the first 27 days of October. Read the CarScout case study.

Run the free checks

No account needed. Paste any of these into Claude Code with your own site.

Ask Claude CodeWhat you get
Check the sitemap for example.comEach sitemap file, the problems in it, and the fix for each.
Does robots.txt block example.com/products/blue-shirt?The rule that decides, with its line number.
How many pages does example.com have?The pages your sitemaps list, grouped by section.

Protect the pages that rank

Add your own pages to your CLAUDE.md:

CLAUDE.md

## Google indexing - Pages that must stay on Google: /, /pricing, /products/* - Pages kept off Google on purpose: /cart, /account/*, /search - Never change the URL of a page that gets clicks. - Every URL in the sitemap returns 200 and is its own canonical. - Before you say why a page isn't on Google, check it with CrawlCoach.

To block a change outright, add a hook. This one stops Claude Code from editing robots.txt or adding noindex, and Claude shows you the change instead.

.claude/hooks/protect-indexing.sh

#!/bin/bash # Blocks edits that can take pages off Google: robots.txt and noindex. input=$(cat) file=$(jq -r '.tool_input.file_path // empty' <<<"$input") text=$(jq -r '[.tool_input.content, .tool_input.new_string, .tool_input.edits[]?.new_string] | map(select(. != null)) | join("\n")' <<<"$input") if [[ "$file" == *robots.txt ]]; then echo "robots.txt is protected. Show me the change and I'll make it." >&2 exit 2 fi if grep -qi 'noindex' <<<"$text"; then echo "This change contains noindex, which keeps a page off Google. Show me the change and I'll make it." >&2 exit 2 fi exit 0

.claude/settings.json

{ "hooks": { "PreToolUse": [ { "matcher": "Edit|MultiEdit|Write", "hooks": [{ "type": "command", "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/protect-indexing.sh" }] } ] } }

Then run chmod +x .claude/hooks/protect-indexing.sh. The hook needs jq.

For Codex, Claude on the web, and other agents, see Let your AI agent fix your pages.

Questions

Do I need a CrawlCoach account?
Not for the free checks. To fix your own pages, get the free report with the Google account you use for Search Console, then sign in from Claude Code.
My site is on Shopify, Wix, or Squarespace. Does this work?
Yes. Claude Code can't click in your site builder, so it writes each change and tells you where to paste it.
What does it cost?
The free checks cost nothing, and the free report covers up to 500 pages. The fix list starts at $29 a month.

See which of your pages Google skipped

Get my free report

Free for up to 500 pages. No card needed. Sign in with the Google account you use for Search Console.