Skip to content

IndexNow

IndexNow lets you instantly notify search engines (Bing, Yandex, and others) when pages are added or updated. Instead of waiting days for crawlers to find changes, they’re indexed within hours.


  1. You generate a secret key
  2. You place a verification file at https://domain.com/<key>.txt
  3. After deploying, you POST your updated URLs to api.indexnow.org along with the key
  4. All participating search engines receive the submission simultaneously

Setup (already done in the Juju Alpha template)

Section titled “Setup (already done in the Juju Alpha template)”

A file named <key>.txt lives in public/ and contains just the key:

205d1dc34cbc4ab0d6410fb0d5b96745

Accessible at: https://domain.com/205d1dc34cbc4ab0d6410fb0d5b96745.txt

<meta name="indexnow-key" content="205d1dc34cbc4ab0d6410fb0d5b96745" />

Reads the sitemap, filters out noindex pages, and POSTs all URLs to IndexNow:

Terminal window
npm run indexnow

Generate a new key (don’t reuse the Juju Alpha key):

Terminal window
node -e "const c='abcdef0123456789';let k='';for(let i=0;i<32;i++)k+=c[Math.floor(Math.random()*c.length)];console.log(k)"

Then:

  1. Create public/<new-key>.txt with the key as content
  2. Update the meta name="indexnow-key" in Layout.astro
  3. Update KEY and KEY_LOCATION in scripts/indexnow.mjs
  4. Update HOST and SITEMAP_URL in scripts/indexnow.mjs

Run npm run indexnow after every deploy that changes public content:

  • New blog post published
  • Service page updated
  • New page added
  • Pricing changed

No need to run it for checkout/payment-return/thank-you page changes - those are noindex and filtered out by the script.


Code Meaning
200 OK - URLs accepted
202 Accepted - queued for processing
400 Bad request - check URL format
403 Forbidden - key mismatch
422 Unprocessable - invalid URLs
429 Too many requests - slow down