Skip to main content

Prompt: a sitemap that stays correct, and IndexNow pings on publish

Paste this into Claude Code, Cursor or Codex inside your repo. The agent builds a sitemap index with one section per content type, uses real last-changed dates, keeps noindex and draft pages out, and pings IndexNow from the code paths that publish content.


Copy prompt

The prompt

Paste it into an agent that has your repo open. It plans first and waits for your OK before writing code.

65 lines · ~1,182 tokens

Or paste one line

Fetch https://www.scrolllaunch.com/prompts/sitemap-indexnow.md and carry out the prompt in its "Prompt" section on this repo. Show me your plan before writing code.

For agents that can fetch URLs. The agent pulls the full prompt from this page's markdown version, which includes the last step above.

What you get

What your repo has when the agent is done

  • /sitemap.xml as an index with one section per content type
  • Shards under 45,000 URLs, generated from the database
  • lastmod from the record's real update date, never the request time
  • No noindex, draft, redirected or private URLs in the sitemap
  • A Sitemap: line in robots.txt
  • An IndexNow key file and a submitToIndexNow() helper called on publish, update and delete
  • A test that validates every section

The result

ScrollLaunch ships the same setup

These are live on this site. Open them to see what a passing result looks like.

Check your result

Deployed? Score your site

Runs your live URL through the free Sitemap Finder & Checker. Find and validate sitemaps on any website - robots.txt discovery, validity, and URL totals.

The checker finds your sitemap through robots.txt, follows the index and counts URLs per file. Test IndexNow separately with the IndexNow tester.

How to use

4 steps from paste to deploy

  1. 1

    Open your repo in a coding agent

    Claude Code, Cursor (agent mode), Codex or Windsurf, with database access in development.

  2. 2

    Paste the prompt and check the section plan

    Look at the URL counts and where each lastmod comes from. If a section's date source is 'now', push back.

  3. 3

    Say OK

    The agent builds the sections, the IndexNow helper and the publish hooks, plus a test.

  4. 4

    Deploy and submit

    Submit /sitemap.xml in Google Search Console and Bing Webmaster Tools, then run the sitemap checker.

Next

Shipped it? Put it in front of people

Launch on ScrollLaunch

A week on the leaderboard and a permanent product page with a markdown version that AI agents can read. Free launches get a dofollow backlink while the badge stays on your site.

Questions

Sitemap + IndexNow prompt FAQ

Does Google use IndexNow?

No. Bing, Yandex, Seznam and Naver do, and Bing's index feeds several AI search products. Google relies on the sitemap and crawling, which is why the sitemap half of this prompt matters more.

Why not set lastmod to today?

Search engines compare lastmod with what actually changed. If every date moves on every request, they stop trusting the field for your whole site.

More prompts

Other prompts