Blog/How to Set Up IndexNow (Step-by-Step, With Code)
INDEXNOWTECHNICAL SEOTUTORIALINDEXING

How to Set Up IndexNow (Step-by-Step, With Code)

RankCart Team5 min read
IN THIS ARTICLE
What you'll needStep 1: Generate an API keyStep 2: Host the key fileStep 3: Submit a single URL (GET)Step 4: Submit URLs in bulk (POST)Understanding the response codesAutomating IndexNow when content changesIndexNow on Shopify, WooCommerce, and other platformsCommon mistakes to avoid

IndexNow lets you notify search engines the instant a page changes so they recrawl it faster. If you're not sure what it is or which engines use it, start with What Is IndexNow? — this guide is the hands-on version. By the end you'll have a working key and be able to submit URLs one at a time or in bulk.

Reminder before you invest time: IndexNow is used by Bing and Yandex, not Google. It's worth setting up if you get traffic from those engines, sell into Bing/Yandex-heavy markets, or care about AI assistants that use Bing's index.

What you'll need

  • The ability to upload a file to the root of your domain (or to control a path where you can host a small text file).
  • A way to make an HTTP request — a browser URL, curl, or a few lines of code in your app.
  • About ten minutes.

Step 1: Generate an API key

Your key is a string of 8 to 128 characters using only letters (a–z, A–Z), numbers (0–9), and dashes. A common choice is a 32-character hexadecimal string. You can generate one with any UUID/hex generator, or on the command line:

# Generate a 32-character hex key
openssl rand -hex 16
# → e.g. a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6

Keep this key — you'll reference it in every submission. It isn't a secret in the security sense (it's published on your own site), but it must stay consistent for a given host.

Step 2: Host the key file

Create a plain-text file named after your key, containing exactly the key and nothing else. For the example key above, the file is a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt and its entire contents are:

a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6

Upload it to the root of your site so it's reachable at:

https://www.example.com/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt

This file is how search engines verify you own the domain. When you submit a URL, the engine fetches this file and checks that the key inside matches the key you submitted. You can host it somewhere other than the root (a subfolder, for instance), but then you must tell the engine where it lives using the keyLocation parameter in Step 3.

Step 3: Submit a single URL (GET)

The simplest submission is a GET request. You can literally paste this into a browser address bar or run it with curl. Replace the host, URL, and key with your own:

curl "https://api.indexnow.org/indexnow?url=https://www.example.com/products/blue-widget&key=a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6&keyLocation=https://www.example.com/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt"

If your key file is at the domain root, keyLocation is optional — the engine will look for it automatically. You can submit to the shared endpoint (api.indexnow.org) or directly to an engine (www.bing.com/indexnow, yandex.com/indexnow); all participating engines share the submission either way.

Step 4: Submit URLs in bulk (POST)

For more than one URL, send a POST request with a JSON body. You can include up to 10,000 URLs in a single request, and every URL must belong to the same host as the key:

curl -X POST "https://api.indexnow.org/indexnow" \
  -H "Content-Type: application/json; charset=utf-8" \
  -d '{
    "host": "www.example.com",
    "key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
    "keyLocation": "https://www.example.com/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt",
    "urlList": [
      "https://www.example.com/products/blue-widget",
      "https://www.example.com/products/red-widget",
      "https://www.example.com/collections/summer-sale"
    ]
  }'

Understanding the response codes

IndexNow uses standard HTTP status codes to tell you what happened. The important ones:

  • 200 OK — URL(s) received and the key was validated successfully. You're done.
  • 202 Accepted — Received, but the key is still being validated. Usually fine; check that your key file is reachable.
  • 400 Bad Request — The request is malformed (bad JSON, missing fields, invalid URL format).
  • 403 Forbidden — The key could not be validated. Usually the key file is missing, unreachable, or its contents don't match the submitted key.
  • 422 Unprocessable Entity — The URLs don't belong to the host, or the key doesn't match the key file. Check that every URL is on the same domain as the key.
  • 429 Too Many Requests — You're submitting too often and are being rate-limited. Back off and only submit real changes.

Automating IndexNow when content changes

Manual submission is fine for a handful of pages, but the real value is automatic submission the moment content changes. The pattern: whenever your app creates, updates, or deletes a page, fire off an IndexNow ping for that URL. Here's a minimal Node.js helper you can call from a publish/update hook:

const INDEXNOW_KEY = "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6";
const HOST = "www.example.com";

async function submitToIndexNow(urls) {
  const res = await fetch("https://api.indexnow.org/indexnow", {
    method: "POST",
    headers: { "Content-Type": "application/json; charset=utf-8" },
    body: JSON.stringify({
      host: HOST,
      key: INDEXNOW_KEY,
      keyLocation: `https://${HOST}/${INDEXNOW_KEY}.txt`,
      urlList: urls,
    }),
  });
  // 200 / 202 = success. Log anything else so you can debug key issues.
  if (![200, 202].includes(res.status)) {
    console.error("IndexNow submission failed:", res.status);
  }
}

// Call it from your publish/update/delete handler:
// await submitToIndexNow(["https://www.example.com/products/blue-widget"]);

Only submit on real changes. Wiring IndexNow to fire on every page load, or re-submitting your whole catalogue nightly regardless of what changed, is exactly the behaviour that gets you rate-limited (429). One ping per genuine create/update/delete is the goal.

IndexNow on Shopify, WooCommerce, and other platforms

If you're not comfortable writing code, most platforms have a shortcut:

  • Cloudflare — if your site is behind Cloudflare, its Crawler Hints feature can generate a key and submit changes to IndexNow automatically. Toggle it on in the Cache settings; no code required.
  • WordPress / WooCommerce — plugins like Yoast SEO, Rank Math, and a dedicated Bing IndexNow plugin submit URLs to IndexNow automatically when you publish or update content.
  • Wix and Duda — have built-in IndexNow support that submits changes for you with no setup.
  • Shopify — has no native IndexNow feature. Your options are a Cloudflare proxy in front of your storefront, a third-party app, or a small webhook-driven script (using Shopify's product/collection webhooks) that calls the helper above.

Common mistakes to avoid

  1. Key file returns the wrong content-type or a 404. It must be reachable as plain text at the exact URL you reference. Open it in a browser to confirm.
  2. Submitting URLs from a different host than the key file. Every URL must be on the same domain (including www vs non-www and http vs https). Mismatches return 422.
  3. Re-submitting unchanged URLs on a schedule. This wastes your rate limit and signals spammy behaviour. Submit changes, not everything.
  4. Expecting Google results. IndexNow doesn't feed Google. Set your expectations to Bing, Yandex, and Bing-powered AI surfaces.
  5. Treating a 200 as "indexed". A 200 means the notification was accepted, not that the page is indexed or ranking. The page still has to earn that on its own.

That's the whole setup. Generate a key, host the file, and submit real changes — ideally automatically. IndexNow makes sure the search engines that support it hear about your changes fast. Making those changes worth ranking is still on you: run a free RankCart audit to find the on-page issues that hold your pages back once the crawler does arrive.

Frequently asked questions

Where do I host the IndexNow key file?

Host a plain-text file named after your key (e.g. yourkey.txt) at the root of your domain, containing only the key. Search engines fetch this file to verify you own the site. You can host it elsewhere if you specify the keyLocation parameter in your submissions.

How many URLs can I submit at once with IndexNow?

Up to 10,000 URLs in a single POST request. All URLs must belong to the same host as the key file. For a single URL you can use a simple GET request instead.

What does a 200 response from IndexNow mean?

A 200 means your submission was received and your key validated successfully. It does not mean the page is indexed — the search engine still recrawls and evaluates the page normally before deciding to index or rank it.

Does Shopify support IndexNow natively?

No. Shopify has no built-in IndexNow feature. You can add it via a Cloudflare proxy with Crawler Hints, a third-party app, or a small webhook-driven script that submits changed product and collection URLs.

RankCart
RankCart Team

RankCart builds automated SEO & AI-search-readiness audits for eCommerce stores. These guides come from the same analysis that powers the product — the patterns we see auditing Shopify, WooCommerce, BigCommerce, and other storefronts.

About RankCart →

See what your store is missing

Run a free SEO & AI readiness audit on your Shopify store — no signup required.

Check My Store for Free →
Related reading
July 22, 2026 · 5 min read

What Is IndexNow? The Instant Indexing Protocol, Explained

IndexNow lets you tell search engines the moment a page changes, instead of waiting for a crawler to notice. Here's what it is, which engines actually use it, and what happens behind the scenes when you ping it.

April 10, 2026 · 5 min read

How to Fix Missing Meta Descriptions on Shopify (Step-by-Step)

Meta descriptions are your store's pitch to potential customers in search results. Learn how to find missing descriptions and add them across your Shopify store.

April 10, 2026 · 5 min read

How to Fix a Slow Shopify Store: Speed Optimization Guide

A slow store loses customers. Learn the common causes of Shopify speed issues and how to fix them — step by step.

← Back to all articles