Key takeaways
  • The IndexNow key file is proof that you control a host, not a password, so the real job is keeping the file reachable and matched to the key you submit with.
  • Every hostname you submit URLs for needs its own key file served from that hostname, and a key that works on one host does not verify another.
  • Rotate by adding the new key file first, switching integrations over, and only then retiring the old file, and treat rotation as a response to abuse rather than a routine ritual.

The short answer

An IndexNow key is a string you generate once, publish as a plain text file on each host you submit URLs for, and send along with every submission. Its purpose is to prove that the party submitting URLs for a host can also place a file on that host. That is the whole trick. It is not a password, it is not hidden, and it does not give anyone access to your server or your account. If you keep the key file reachable, keep the key in your request identical to the file's contents, and rotate deliberately when something goes wrong, most key management problems never happen.

The rest of this article covers the details: how to generate a valid key, where to host it, how to handle subdomains and staging, what to do if the key is copied or misused, how to rotate it without breaking anything, and the errors you are most likely to hit. It also explains where InstantIndexingPro fits, since we build it to manage the submissions and the logs that show what happened afterward.

What the key is, and what the key file proves

IndexNow is a protocol that lets a site notify participating search engines when URLs are added, updated, or deleted. Instead of waiting for a crawler to rediscover a page, the site sends a small request listing the changed URLs. Bing, Yandex, and several other engines accept these notifications. Google has said it is evaluating the protocol but does not treat it the way Bing does, so you should not assume that every engine acts on a submission in the same way.

The key exists because an open endpoint that accepts URL notifications for any domain would be trivially abused. Anyone could claim to have changed URLs on a site they do not control. To prevent that, the engine needs a way to check that the submitter controls the host. The mechanism is simple: the engine fetches a text file from the host, named after the key, and checks that its contents match the key in the submission. If they match, the host is considered verified for that submission.

This is a good design for what it is trying to do, which is establish domain control. It is a weak design for anything stronger. Because the file is public, anyone who fetches it can learn the key. So the key cannot prevent a person who has already seen it from submitting URLs. What it does prevent is submissions from people who have never seen it. That distinction matters for everything else in this article. The key is a low-value credential, and your procedures should match that.

Key requirements

The IndexNow specification sets the rules for a valid key. A key must be between 8 and 128 characters long. It can contain letters, digits, and hyphens. Most people generate hexadecimal keys, typically 32 characters from a random source, because hex is easy to produce and easy to check. Hex is a convenient choice, not a requirement; any string that meets the length and character rules is valid.

Generate the key with a cryptographically secure random source rather than by typing something memorable. A key you invent by hand is more likely to be guessable, and a guessable key is a weaker proof of domain control. Any of the standard tools on your system will do. The important part is the randomness, not the tool.

Two practical notes. First, the key you put in the file and the key you send in each submission must match exactly, including case. Second, do not reuse a key that has been published anywhere, such as a tutorial, a repository, or a screenshot, for production. Generate a fresh one for each host where you can.

Where to host the key file

By default, the engine looks for the key file at the root of the host, using the key as the file name with a .txt extension. If your key is 3f9c2a7e8b1d4f06a5c9e2b7d8f1a402, the file should be reachable at that host, at the root, named with the key and a .txt extension. The file's entire content should be the key itself. Avoid adding a byte order mark, extra headers, HTML, or explanatory text. A trailing newline is usually tolerated, but leaving it out removes one variable from troubleshooting.

Serve the file as plain text, and make sure it is not redirected, blocked by a firewall rule, or wrapped in a page template by your framework. The root location is the easiest to verify because it does not depend on any extra configuration in your request.

Sometimes the root is not the right place. Perhaps your site runs behind a path prefix, your CMS owns the root, or you would rather keep verification files in a dedicated directory. For those cases, the protocol supports a keyLocation parameter. It tells the engine the full URL of the key file, which may be anywhere on the host and may use a different file name.

Here is an example of a JSON submission that names a key location explicitly:

{
  "host": "www.example.com",
  "key": "3f9c2a7e8b1d4f06a5c9e2b7d8f1a402",
  "keyLocation": "https://www.example.com/indexnow/3f9c2a7e8b1d4f06a5c9e2b7d8f1a402.txt",
  "urlList": [
    "https://www.example.com/blog/indexnow-key-management"
  ]
}

The key shown is a placeholder, not a real credential. The important points are that the keyLocation must point to a file on the same host as the URLs you submit, and that the file at that location must contain exactly the value in the key field. If you use keyLocation, you can drop the root copy entirely, but do not change the key value without also updating the file.

Choose one location per host and document it. Teams that move the key file between submissions tend to end up with a stale file somewhere that nobody remembers, and a stale file is one of the most common causes of verification failures.

One key or many

You can run an entire site with one key, several keys, or one key per host. Each choice has trade-offs.

A single key is the simplest. You generate it once, host it on each relevant hostname, and use it everywhere. The cost is that rotation becomes all-or-nothing. If you need to change the key because of a problem on one host, every integration using it has to change at the same time.

Multiple keys let you separate responsibilities. For example, you might give your CMS one key and your analytics pipeline another. If one integration is compromised or retired, you can revoke its key without touching the others. The cost is that each key needs its own file on each host, and every integration needs to know which key it owns. That is manageable for a small number of keys and becomes tedious past a handful.

For most teams, one key per host is the sweet spot. Each hostname has its own key, the key is shared across the integrations that submit for that host, and rotation affects one host at a time. If your organization has a genuine reason to separate submitters, such as different agencies working on different sections of the same host, split by submitter. Otherwise, do not add keys you will not be able to track later.

Whichever you choose, write down which key belongs to which host and which integration uses it. An undocumented set of keys is worse than a single key, because nobody can tell which one to revoke when something goes wrong.

Subdomains, separate hosts, and staging

This is where most confusion comes from, so be precise. The engine verifies the key against a host, not against a domain in the abstract. example.com, www.example.com, and blog.example.com are three different hosts. A key file served from one of them does not verify the others. If you submit URLs for blog.example.com, the key file has to be reachable on blog.example.com, and the keyLocation for those submissions has to be on that same host.

In practice, this means you need a verifiable key file on every hostname that carries URLs you want to submit. If your canonical site is www.example.com but your blog is on a subdomain, you need files on both. If you redirect the apex to www, check whether the redirect affects the key file path. A redirected key file often fails verification even though it looks fine in a browser, because the engine may not follow the redirect the way you expect.

Separate properties need their own keys, and the same applies to country or language sites on separate hosts. Do not assume that a key set up for one property will carry over to another just because they share a brand.

Staging environments deserve a clear rule: do not submit staging URLs to IndexNow at all. Staging hosts are usually protected or marked as not for indexing, and a notification that tells a search engine about a staging page can cause that page to be discovered and crawled when you did not intend it. If your staging host must be verifiable for testing the integration, use a separate key for it, keep it in a separate configuration, and make sure your submission code cannot run against production hosts while pointed at staging, or the other way around.

When a key is exposed

Because the key is public by design, "exposed" is the wrong word for most situations. Anyone who has visited your site and fetched the key file already knows the key. The question is not whether the key is known, but whether anyone is using it to submit URLs you did not authorize.

Signs of abuse include submissions for URLs that do not exist on your site, a spike in submissions you cannot trace to a known integration, or submissions for a host you did not configure. Your submission logs are the first place to check. If the pattern points to an unknown submitter, rotating the key is the appropriate response. It cuts off anyone relying on the old value.

Rotation is not a cure for every problem. If the abuse is merely noise, such as a crawler that has discovered your key and submits junk URLs, the cost is usually limited to some wasted requests, and rotation may not be worth the disruption. Weigh the impact on your legitimate integrations against the impact of continued submissions. Be honest with yourself about which one is actually hurting you.

If you do rotate, remember that the old key is now compromised by definition. Remove the old file once your integrations have moved over, as described below, so that the old value stops verifying anything.

How to rotate a key safely

Rotation is mostly a matter of ordering. The safe sequence keeps verification working at every step, so that submissions never go out with a key the engine cannot verify.

Start by generating the new key and hosting its file at the same location as the old one, or at a new keyLocation if you are moving. Put the new file in place first, before any integration uses the new key. Fetch it and confirm that it loads as plain text and contains exactly the new key. Do this on every host that needs it.

Next, update your integrations to send the new key in their submissions. Do this one integration at a time where you can, and watch the results after each change. If you run several integrations, prioritize the ones that submit the most URLs.

Leave the old key file in place for a transition period. This covers any submissions still in flight, any integration you forgot, and any cached state on the engine's side. There is no universal correct length, and it depends on how quickly your systems move. A few days is a reasonable starting point for most sites, longer if you have integrations that run on slow schedules. Use your submission logs to confirm that nothing is still using the old key before you retire it.

Finally, remove the old key file and confirm that the old URL now returns a not-found response rather than the old key. Record the change: the date, the new key's location, and which integrations were updated. Future you will need that record.

One rotation mistake is especially common. Teams remove the old file as soon as the new one is live, and then discover that one forgotten cron job or third-party plugin is still sending the old key, which now fails. The transition window exists to catch exactly that.

Staging and production keys

Keep staging and production keys separate, and keep staging out of IndexNow entirely if you can. The cleanest setup is that production has a key, staging has no key or has a test key that never corresponds to a real indexable host, and your submission code reads the key and host from environment-specific configuration.

Never copy the production key into a staging environment, even for testing. Staging environments are often less well protected, copied for debugging, and shared with contractors. A production key that leaks from staging is still a production key, and rotating it now affects live submissions. If you need to test the integration end to end, use a dedicated test host that you control, with its own key, and make sure its submissions are clearly separated in your logs.

The other direction also matters. Code that sends production submissions should be unable to target a staging host by accident. A misconfigured environment variable that sends staging URLs to the production endpoint, or production URLs from a test run, is a common source of noise in submission logs. Check your configuration when you set up a new environment, and review it when you change how your deployment works.

Common key errors

Most failures fall into a short list. Check them in order.

The key file is not reachable. The engine cannot fetch the file at the expected location. This happens when the file is missing from the deployed build, the path is wrong, a redirect sends the request elsewhere, a security rule blocks it, or a CDN serves a stale or missing copy. Fetch the exact URL from outside your network with curl or a plain browser. If it does not return the key with a success status, the problem is on your side.

The content type is wrong. The file is served as HTML, or wrapped in a template, so the response contains markup around the key. This is common with frameworks that route every unknown path to a page template. The fix is to serve the key file as a static asset, bypassing the template layer. Plain text is the expected format, and the file should contain only the key.

The key does not match. The key in your submission differs from the file's content. Check for trailing whitespace, a byte order mark, a different case, a character that looks similar, or an old key still in one of your integrations. Compare the two values programmatically rather than by eye.

The host does not match. The URLs you submit belong to a different hostname than the one the key was verified against, or the keyLocation is on a different host from the URLs. This is the most common cause of a rejection after a site move or a subdomain change. Check every URL in the request, not just the first one.

Rate limits and transient errors. If you receive a too-many-requests response, back off and retry later rather than resubmitting immediately. Repeated retries of a rejected request do not help and may worsen the situation.

When you see a non-success response, record the status code and the full request you sent, minus anything sensitive, before changing anything. Changing several things at once makes it impossible to know which change fixed the problem.

Where InstantIndexingPro fits

Managing IndexNow keys by hand works fine for one site with one integration. It gets harder once you have several hosts, several submitters, and a need to know what happened afterward. That is the gap InstantIndexingPro is designed to fill.

In InstantIndexingPro, you keep the key configuration for each host you submit for in one place, along with the key location to use. Submissions go out with that configuration attached, so you are not hunting through scripts to find which key belongs to which host. Logs record the submissions themselves, and they also show which bots fetched each URL afterward. That second part matters for key management, because it gives you a way to check whether a key change or a new submission path had any visible effect on crawling. It does not prove that an engine indexed a page, but it does show whether your URLs are being fetched at all.

We are also honest about the limits. InstantIndexingPro does not make your key more secret, and it cannot stop someone who has copied the key from submitting URLs. It does make the key easier to rotate deliberately, easier to audit, and easier to tell apart when several hosts are involved. Use it as a management layer, not as a security boundary.

What to do

Work through this list once for each host you submit URLs for. It takes less time than it sounds, and it prevents most of the problems described above.

  1. Inventory every hostname that carries URLs you submit, including subdomains, country sites, and any host that serves blog or help content.
  2. Generate a fresh, random key for each host, between 8 and 128 characters, using letters, digits, and hyphens.
  3. Host the key file on each host as plain text, containing only the key, and fetch each one from outside your network to confirm it loads.
  4. Decide whether each host uses the root location or a keyLocation, and write the choice down.
  5. Record which integration uses which key, and make sure every submitter reads the key from configuration rather than from code.
  6. Keep staging out of submissions, and never share production keys with staging environments.
  7. Check your submission logs after any change, and look for unexpected hosts, unexpected URLs, or unexplained volume.
  8. Rotate in order: publish the new file, switch integrations, wait out a transition window, then remove the old file and record the change.
  9. Rotate when you have a real reason, such as confirmed abuse or a departed integration owner, rather than on a calendar you do not need.
  10. Set expectations honestly with your team. IndexNow is a faster way to tell engines about changes, not a guarantee that a page will be indexed or rank.

If you do these things, your key will do its one job: proving that the party submitting URLs can write to the host. Everything beyond that is ordinary operational hygiene, and it is worth doing well.