Skip to content
Book a call

IndexNow, and the key that is meant to be public

· 4-minute read · Measurement and growth · by Direct Softworks

IndexNow proves you own a site with a key you publish at its root. Hide the key and it stops working. Submit too much and engines stop listening.

On 8 September we searched Bing for our own domain name and got nothing. Not a thin result, not the homepage on its own: no result at all. Google, for all its rationing, had four of our URLs. Bing had none.

That costs more than Bing's own share of searches suggests, because Bing's index also sits behind several other search and assistant products. And the cause was the one that kept thirteen of our pages waiting in Google's queue: Bing finds sites largely by following links, and we had one inbound link on the whole web.

IndexNow is the way round that. It is a small open protocol: you send a list of URLs that changed, and the engine that receives it shares the submission with the others that take part. No account, no verification step, no dashboard. The participants listed on indexnow.org include Bing, Naver, Seznam, Yandex and Yep. Google is not on the list.

The key is the proof

With no account, the engine needs another way to know a submission came from whoever controls the site. The protocol's answer is a key. You choose one, between 8 and 128 characters of letters, digits and dashes, and serve it as a text file named after itself at the root of your host: /<key>.txt, containing the key. Every submission carries the same key. The engine fetches the file, and if the file says what the submission said, the sender controls the site.

So the key is not a secret, and it cannot be one. It is published, by design, to anyone who asks for that URL. Ours is a plain constant in the site's configuration file, next to the site's name, with a comment explaining that hiding it would defeat it.

That cuts against a good instinct. A 32-character hex string in a codebase usually is a credential, and the reflex is to move it into an environment variable and keep it out of the repository. Here that buys nothing and adds a way to break it: a build that cannot see the variable submits one key while the site serves another, or none.

What does need protecting is the pairing. The constant and the file have to agree, and deleting either one fails without a sound: pages load, the build passes, and only the submissions stop counting. So our content check reads the key out of the configuration and asserts that the matching file exists and contains exactly that value. It looks absurd until somebody tidies away a stray text file at the root.

What the response codes mean

The specification's table is short, and worth knowing exactly, because two of the failures are easy to confuse.

Code Meaning
200 Submitted
202 Received, key validation still pending
400 Invalid format
403 Key not valid: file not found, or found without the key in it
422 URLs that do not belong to the host, or a key that does not fit the protocol's format
429 Too many requests, treated as potential spam

A 202 is normal on a first submission, before the engine has fetched the file, and should not be reported as a fault. A missing or mismatched key file is a 403, not a 422. Our job treats anything other than 200 or 202 as a failure and records the status code with it, rather than guessing which failure it was. That record lands in the log of the daily jobs, which somebody has to read, and that is the real argument for the pre-deploy check above.

Submit what changed, and nothing else

The tempting implementation is a daily job that submits every URL in the sitemap. It is easy, and it is precisely the behaviour the protocol asks you to avoid. The FAQ says to submit URLs when content is added, updated or removed, and not to submit the same URL many times a day without a meaningful change. An engine is entitled to start discounting a host that resubmits twenty-six unchanged pages every morning.

Ours runs once a day with the other scheduled jobs and builds its list from timestamps: posts and case studies whose rows changed in the last 48 hours, plus the blog index or the projects page when something on them changed, because those are the pages a crawler walks to find the rest. The window is two days rather than one so that a missed run is recovered by the next. Most mornings it submits nothing, and reports that as a success with the reason written beside it, so that a zero reads as a decision rather than as a silent failure.

If you publish on a schedule, one detail decides whether this works. Build the list from the moment a page became reachable, not from the moment its row was written. A post loaded into the database a week before its publication date has an old row and a new page. Key the submission on the row and you announce the URL while it still answers 404, then stay silent on the day it goes live.

The general shape

IndexNow is not a ranking lever. Submitting a URL does not guarantee that it is crawled or indexed, and the FAQ says so. What it changes is discovery: a site with almost no inbound links stops depending on being found by accident.

The key is the interesting part. It is a credential-shaped string whose entire job is to be public, and the risk is not that someone reads it but that its two copies drift apart. Same lesson as the captcha key that was compiled out of the bundle: know which values are secrets and which are public constants, because treating a public constant like a secret is how it quietly goes missing.

More notes