Learn how to implement both single and bulk URL submission for faster indexing
IndexNow is a protocol that allows website owners to instantly notify search engines when content is added, updated, or deleted. Supported by Bing, Yandex, and other search engines, it significantly reduces the time between content publication and indexing.
Key Benefits:
Before using IndexNow, you must verify ownership of your website in:
You have two options to obtain your IndexNow key:
{key}.txt
(e.g., d9a7e8f1b6c4d3e2f9a8b7c6d5e4f3a2.txt
)Important: The key file must be publicly accessible at https://yourdomain.com/{key}.txt
Use this method for submitting individual URLs when content changes are infrequent.
GET https://api.indexnow.org/IndexNow
Parameter | Required | Description | Example |
---|---|---|---|
url |
Yes | The URL to be indexed | https://example.com/new-page |
key |
Yes | Your IndexNow API key | d9a7e8f1b6c4d3e2f9a8b7c6d5e4f3a2 |
curl -X GET "https://api.indexnow.org/IndexNow?url=https://www.example.org/new-article&key=d9a7e8f1b6c4d3e2f9a8b7c6d5e4f3a2"
const axios = require('axios');
const url = 'https://www.example.org/new-article';
const key = 'd9a7e8f1b6c4d3e2f9a8b7c6d5e4f3a2';
axios.get(`https://api.indexnow.org/IndexNow?url=${encodeURIComponent(url)}&key=${key}`)
.then(response => {
console.log('Submission successful:', response.status);
})
.catch(error => {
console.error('Error:', error.response.status);
});
Status Code: 200 OK or 202 Accepted
Body: Empty (no content)
Use this method for submitting multiple URLs at once, ideal for site migrations or content updates.
POST https://api.indexnow.org/IndexNow
Field | Required | Description | Example |
---|---|---|---|
host |
Yes | Your domain (without protocol) | www.example.org |
key |
Yes | Your IndexNow API key | d9a7e8f1b6c4d3e2f9a8b7c6d5e4f3a2 |
keyLocation |
No* | Full URL to key file (required if not at root) | https://www.example.org/keys/mykey.txt |
urlList |
Yes | Array of URLs to submit (max 10,000/day) | ["https://www.example.org/url1", "https://www.example.org/url2"] |
*keyLocation
is optional if your key file is at https://{host}/{key}.txt
curl -X POST "https://api.indexnow.org/IndexNow" \
-H "Content-Type: application/json" \
-d '{
"host": "www.example.org",
"key": "d9a7e8f1b6c4d3e2f9a8b7c6d5e4f3a2",
"keyLocation": "https://www.example.org/d9a7e8f1b6c4d3e2f9a8b7c6d5e4f3a2.txt",
"urlList": [
"https://www.example.org/new-page-1",
"https://www.example.org/new-page-2"
]
}'
import requests
url = "https://api.indexnow.org/IndexNow"
payload = {
"host": "www.example.org",
"key": "d9a7e8f1b6c4d3e2f9a8b7c6d5e4f3a2",
"keyLocation": "https://www.example.org/d9a7e8f1b6c4d3e2f9a8b7c6d5e4f3a2.txt",
"urlList": [
"https://www.example.org/new-page-1",
"https://www.example.org/new-page-2"
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print("Status Code:", response.status_code)
print("Response:", response.text)
Status Code: 202 Accepted
Body: Empty (no content)
Test the IndexNow API easily using Postman with these configurations.
https://api.indexnow.org/IndexNow
Go to the "Headers" tab and add:
Key | Value |
---|---|
Content-Type |
application/json |
Host |
api.indexnow.org |
{
"host": "www.example.org",
"key": "d9a7e8f1b6c4d3e2f9a8b7c6d5e4f3a2",
"keyLocation": "https://www.example.org/d9a7e8f1b6c4d3e2f9a8b7c6d5e4f3a2.txt",
"urlList": [
"https://www.example.org/url1",
"https://www.example.org/url2"
]
}
Click "Send" and check the response:
Issue | Possible Cause | Solution |
---|---|---|
202 Accepted but URLs not indexed | Indexing takes time (not immediate) | Wait 24-48 hours and check Bing Webmaster Tools |
403 Forbidden | Invalid API key or key file inaccessible | Verify key file exists at the specified URL |
400 Bad Request | Invalid JSON or missing required fields | Check request body for errors |
404 Not Found | Key file missing from website root | Upload {key}.txt to your domain's root |
Pro Tip: Use IndexNow Validator to test your key file setup.
Implementing IndexNow can dramatically improve your website's visibility in search engines by reducing the time between content updates and indexing. Whether you choose single URL submissions for occasional updates or bulk submissions for major changes, the API provides a simple yet powerful way to communicate directly with search engines.
Next Steps:
Watch this step-by-step tutorial to see IndexNow API implementation in action:
This 10-minute tutorial walks you through the complete IndexNow API integration process.
Warning!
This website has enhanced security measures in place.
For access to the source code, contact: rr@edutechrr.com