IndexNow returns 422 or 403? Check host and key location
Debug IndexNow rejection responses by matching each submitted URL to its host, inspecting the public key file, and testing one URL before retrying a batch.
By Crawlito · 5 min read
In short
- IndexNow requires proof that the submitted URLs belong to the host associated with the key.
- A key file below the host root can constrain the URL paths it covers.
- A rejected submission needs a corrected request or key response before a retry is useful.
On this page
- Preserve one failed request before rebuilding it
- Match the request host with the public URL
- Read the key file as an anonymous client
- Reduce the batch to a reproducible request
- Retry only after the relevant condition changes
- Verify the request after a domain migration
- Frequently asked questions
- Check the submitted page
When IndexNow returns 403 or 422, compare the request's host, submitted URLs, key, and key-file location as one set. Fetch the key file publicly and inspect its actual text, then submit one URL you control. IndexNow documents 403 for an invalid key and 422 for URLs that do not belong to the host or a key that fails the protocol's rules. IndexNow protocol documentation
Preserve one failed request before rebuilding it
Record the endpoint, HTTP status, response body, request host, key location, and one affected page URL. Keep the original batch count and timestamp, but share only the details needed for the investigation. An application can wrap the submission inside its own retry service, so the error visible in a dashboard may be several steps away from the actual API response.
Check whether your integration reports the status from the IndexNow endpoint or from a proxy in front of it. A local task queue failure, network timeout, and protocol rejection call for different repairs. If the request never left your server, changing the key file cannot explain that attempt. If the endpoint returned a specific rejection, keep that response intact while you examine the matching fields.
Choose a harmless, already public page from the affected host as your diagnostic URL. A mixed batch containing several domains makes it harder to isolate ownership and path scope. The IndexNow notification guide explains how submissions fit into content updates. This investigation begins after the notification flow already produced a request.
Match the request host with the public URL
Compare the hostname character for character. A request for www.example.com and an entry at example.com refer to different hosts in the protocol. A blog subdomain also needs the relevant ownership proof. Group submissions by their actual host and use the matching configuration for each group. A site migration often exposes a forgotten hardcoded host in the publishing integration.
Inspect the destination URL before submitting it. If an old address redirects to a new hostname, decide which URL changed and which host's ownership the notification describes. A URL on a vendor's domain may be linked from your website without being under your publishing control. Keep the submitted set within the URLs for which your integration has the required proof.
Use a fully qualified page address in the documented JSON request. The host field contains the host, while each URL contains its own scheme, host, and path. A string assembled from a protocol-prefixed host can accidentally contain a double scheme or duplicated slash. Parse the request in a small test fixture and inspect the resulting host values before it reaches the network.
Read the key file as an anonymous client
IndexNow describes hosting a UTF-8 text key file at the site's root, with an explicit keyLocation available when the file is placed elsewhere. Request the actual public address without an administrator session and inspect the body. A framework might serve its homepage fallback for an unknown .txt path, returning success with HTML instead of the key.
curl -sSL --max-time 20 -D indexnow-key-headers.txt -o indexnow-key-body.txt https://example.com/your-key.txtCompare the body with the key your sender uses. A deployment configuration change can rotate one side while leaving the other unchanged. An upload can also add formatting, template output, or a byte-order artifact that your own comparison ignores. Follow the current protocol's allowed key syntax and file-content requirements. The key proves site ownership for this workflow; publish precisely what that workflow expects.
If the file lives below the root, inspect the documented path scope. A location under /catalog/ cannot automatically validate an unrelated /blog/ URL. Reproduce the request with one page inside the covered path and one intended page outside it in a controlled test. Use the root location when that matches the site's ownership setup and the URLs the publisher legitimately submits.
Reduce the batch to a reproducible request
Create a small request using the documented fields and one public URL. The placeholders below must be replaced with the host, valid key, and file location for your own site. Keep the file separate from command arguments when testing so the exact JSON can be reviewed.
{
"host": "example.com",
"key": "replace-with-your-valid-key",
"keyLocation": "https://example.com/replace-with-your-valid-key.txt",
"urlList": ["https://example.com/guides/install"]
}Validate this file as JSON before sending it through the existing integration. The point is to remove batch construction as a variable. If the single URL is accepted, compare the rejected batch for a second hostname, an out-of-scope path, malformed URL strings, or a different selected key. Keep the data that caused the failure available long enough to add a targeted regression check.
Inspect any redirect or security rule on the key route. A page-specific bot policy might allow articles while challenging text files, or a locale redirect might send the key request to an HTML landing page. The HTTP request testing guide explains why a full GET is valuable here. Repair the intended public file route and test a neighboring protected resource to confirm the change has the right scope.
Retry only after the relevant condition changes
A 403 or 422 generally needs a configuration or request correction. Replaying the same rejected payload repeatedly adds noise without resolving the cause. If the endpoint returns a rate limit or temporary server error, use the provider's response and your integration's retry policy. Keep delivery state distinct from the state of the actual webpage.
IndexNow documents 200 as a successful submission and 202 as accepted with key validation pending. Neither establishes that a search engine indexed the page or selected it for a result. Verify the public page independently, and use the relevant webmaster report or later crawl evidence to follow what happened next. The crawler traffic guide explains what server observations can establish.
After the repair, test one URL from each legitimate host and covered path your production integration supports. Confirm that a deliberately mismatched host is rejected by your own validation before submission. Record the key location, host mapping, and response status in the normal operational log so another engineer can diagnose a future rotation without reconstructing the entire setup.
Verify the request after a domain migration
A publishing service can keep an old host configuration even when the website now redirects to a custom domain. Compare the key file and request fields before and after the migration using one current page URL. Check whether the sender reads its host from the CMS, an environment setting, or a cached integration record.
Correct the configuration at that source and submit a new single-URL test. Then inspect the next ordinary content update produced by the real queue. A manually successful diagnostic request does not prove that the scheduled sender stopped using its previous host and key location.
Frequently asked questions
Can one request include URLs from unrelated domains?
Group URLs according to the protocol's host and ownership requirements. Check the current documentation before constructing a batch across different sites.
Does a browser displaying the key file prove the API can validate it?
Inspect the anonymous response bytes and the exact URL used by the request. A signed-in or cached browser view can hide an access problem.
Should I change the article content to fix a 422 response?
Investigate the rejected request's host, URL scope, and key proof first. Those fields can explain the response even when the article itself is public and readable.
Check the submitted page
Run the free page check on the same URL used in the successful test submission. This confirms the public page can be read alongside the corrected notification flow.
Filed under Access and robots.txt. Topics: indexnow, indexing, troubleshooting