How to Rotate or Replace Your IndexNow API Key
Replacing an IndexNow key is straightforward there is no deregistration or invalidation step. You simply generate a new key, host the new key file, and start using the new key in submissions.
Key Rotation Steps
Generate a new key
Use our key generator or generate cryptographically with openssl rand -hex 16. Save the new key securely.
Create the new key file
Create a file named {new-key}.txt with the key as its contents (no newline, no extra characters).
Upload the new key file before updating your code
Upload the new key file to your server first. Do not update your environment variables yet. This prevents a gap where submissions reference a key file that doesn't exist.
Update your environment variables and deploy
Update INDEXNOW_KEY in your .env.local (and in your hosting platform's env settings), then redeploy.
Test a submission with the new key
Submit a single URL and verify the response is 200 OK.
Remove the old key file
Once the new key is confirmed working, delete the old key file from your server to prevent misuse.