Skip to content

Notify IndexNow after every deploy - #228

Merged
carsonSgit merged 1 commit into
mainfrom
feat/indexnow
Nov 7, 2026
Merged

carsonSgit merged 1 commit into
mainfrom
feat/indexnow

Conversation

@carsonSgit

@carsonSgit carsonSgit commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

IndexNow is how Bing, Yandex, Seznam and Naver learn about new URLs without waiting for a crawl. Google does not consume it — the sitemap already covers Google.

File Purpose
public/<key>.txt 32-hex key file; being served at /<key>.txt is the ownership proof
scripts/indexnow.mjs reads the live sitemap, POSTs the URL list
.github/workflows/indexnow.yml runs it on every push to main, plus a manual dispatch

Preview locally with node scripts/indexnow.mjs --dry-run; a real submission is the same command without the flag.

Two deliberate choices

  • Reads the live sitemap, not out/. IndexNow rejects URLs a crawler cannot fetch yet, so submitting build output before the deploy lands is pointless.
  • Polls for the key file before submitting (40 attempts) rather than racing Vercel. The deploy is asynchronous and the workflow does not own it.

200 and 202 both mean accepted (202 = key pending validation). Anything 4xx fails the run loudly instead of exiting silently.

Verified

  • node scripts/indexnow.mjs --dry-run → 9 URLs, exit 0
  • npx biome ci . clean, npx tsc --noEmit clean

@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
carsonspriggs Ready Ready Preview Nov 7, 2026 7:53pm UTC

IndexNow is how Bing, Yandex, Seznam and Naver learn about new URLs without
waiting for a crawl (Google does not consume it). This adds:

  - public/<key>.txt                the 32-hex key file that proves ownership
  - scripts/indexnow.mjs            reads the live sitemap and POSTs the URL list
  - .github/workflows/indexnow.yml  runs it on every push to main

The script reads the *live* sitemap rather than out/, because IndexNow rejects
URLs the crawler cannot fetch yet. The workflow polls for the key file to go
live before submitting, instead of racing a deploy it does not control.

`node scripts/indexnow.mjs --dry-run` prints what would be submitted.
@carsonSgit
carsonSgit merged commit b9e7dee into main Nov 7, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — fd038540 Deployed Nov 7, 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