Key for user verification
To send URLs, you need to verify that you are the owner of the site for which you send data. To verify this, use a special key: you need to generate it and place a file with it on your site. Yandex checks the key in every API request. The contents of the file and its location should be known only to you and the search engine.
Note
If your site has subdomains, use a separate key for each subdomain.
You can generate the key manually. Some CMS may also support IndexNow.
Key requirements
-
Only UTF-8 encoding is supported.
-
The minimum number of characters in the key is 8, the maximum is 128.
-
The key can contain characters
a-z
,A-Z
,0-9
,-
. -
Use a TXT file or another format with text data. The file must not contain HTML markup. Example:
How do I place a file with a key?
You can place the file:
In this case, the file name must strictly match the key value. For example, the https://www.example.org/EdD8dkmdNLlxREi2LkhJjYOH2kyQbJqM3cBKT5fX.txt
file that contains the EdD8dkmdNLlxREi2LkhJjYOH2kyQbJqM3cBKT5fX
key.
In this case, you need to send the file location in the keyLocation variable in every API request. A request with the key can contain only pages located in the same directory as the key.
For example, the http://example.com/catalog/key12457EDd.txt
key is valid only for the URLs of the pages located in http://example.com/catalog/
and invalid for pages hosted in http://example.com/help/
.
Questions and answers
How do I check that the key is correct?
Send the addresses and check the response code. Code 202 Accepted means that the new key is awaiting verification. Make sure that the key is correct, wait a little while, and send a few more addresses.
A change to code 200 OK means that the key is correct and the addresses have been submitted. If the code remains 202 Accepted, wait a bit longer and send a few more addresses until the code changes to 200 OK.
If the code changes to 4XX, see the description in the table.
Can I use multiple keys for verification?
Yes, if you use several CMS, you should use a separate key for each. Place different key files in the root directory of the site.
Can I use one key for multiple sites?
Yes, you can reuse the same key on two or more domains.
When do I need to change the key?
You don't have to change the key. You can change the key if it becomes known to third parties.