Skip to content

Submit changed pages to Bing with IndexNow after each production deploy - #39

Merged
salsadsid merged 2 commits into
mainfrom
feat/indexnow
Oct 20, 2026
Merged

salsadsid merged 2 commits into
mainfrom
feat/indexnow

Conversation

@salsadsid

Copy link
Copy Markdown
Owner

What changed

Tells Bing about changed pages right after each production deploy, using IndexNow:

  • Key: siteConfig.indexNowKey, served at /f45f7e891bc3827c5178c9ff112a900c.txt as the protocol requires. The
    key is public by design.
  • scripts/indexnow.mjs: reads the live sitemap and submits the pages whose lastmod falls in the last seven
    days. --all submits every page and --dry-run prints the payload instead of sending it. No dependencies (Node 22
    fetch).
  • .github/workflows/indexnow.yml: runs the script when Vercel reports a successful Production deployment. It
    can also be started by hand from the Actions tab, with an all switch.
  • Tests: sitemap parsing, the seven-day window and its edges, the payload (every URL on the key's host), and that
    the key file matches the config.

Why: setting up IndexNow is Bing Webmaster Tools' top recommendation for the site, and Bing already shows the site
more often than Google does (740 vs 676 impressions last month). Bing's index also feeds DuckDuckGo, Copilot and
ChatGPT search, and IndexNow is shared with Yandex, Seznam and Naver. Google doesn't use it.

How I checked it

  • npm run lint
  • npm test (119 passing)
  • npm run build
  • Looked at it on a phone-width screen (320–390 px) in light and dark mode: not applicable, no UI change
  • New or changed explanations follow the writing notes in CONTRIBUTING.md: not applicable

On a local production build:

  • /f45f7e891bc3827c5178c9ff112a900c.txt is served as text/plain and contains just the key.
  • node scripts/indexnow.mjs --dry-run --all http://localhost:3100 builds a payload with all 27 sitemap URLs on
    visualizer-gold.vercel.app, with the right keyLocation.
  • The default dry run on current main reports nothing to submit, because no page changed in the last seven days.

The workflow can only run for real after this is merged.

After merging

  1. Seed every page once: Actions → IndexNow → Run workflow with all checked, or run gh workflow run indexnow.yml -f all=true.
  2. Check that the run log ends with IndexNow accepted 27 URLs (200) or (202), then look at Bing Webmaster Tools →
    IndexNow the next day.
  3. From then on, each production deploy submits the pages it changed.

Bing Webmaster Tools lists IndexNow as its top recommendation for the
site, and 20 of its 27 pages are still waiting to be crawled. The key
lives in siteConfig and is served from public/ as IndexNow requires.
scripts/indexnow.mjs reads the sitemap and submits the pages whose
lastmod falls in the last seven days, or every page with --all;
--dry-run prints the payload instead of sending it.
Runs scripts/indexnow.mjs when Vercel reports a successful Production
deployment, so pages changed in the last week reach Bing without
waiting for a crawl. A manual run with "all" submits every page in
the sitemap, for the first seeding or after a large change.
@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
visualizer Ready Ready Preview Oct 20, 2026 10:28am UTC

@salsadsid
salsadsid merged commit 93a5e16 into main Oct 20, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 101d498d Deployed Oct 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant