Netlify serves everything in your publish directory from the site root, so committing the file is all it takes. It then survives every subsequent deploy.
Step by step
- 1 Add a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt to your publish directory — commonly public/, dist/, build/ or _site/ depending on your generator.
- 2 If you deploy a folder directly rather than building, just drop the file in that folder.
- 3 Commit and deploy.
- 4 Confirm the URL loads, then click Verify.
Check which directory Netlify publishes (netlify.toml)
[build]
publish = "dist" # put a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt inside this folder
The key shown is an example. Yours is generated when you add the domain.
Watch out for
- A generator that wipes its output folder on each build will delete a file you added there by hand — keep it in the source directory that gets copied, such as static/ or public/.
- Netlify redirects in _redirects can shadow the path if you have a catch-all rule; add an exception for the key file.
Then what?
Hosting the key file proves you own the domain — it doesn't submit anything on its own. You still need something watching for changes and calling the IndexNow API with the right URLs at the right time. You can build that yourself, or let us run it for $12 a year.
Set up automatic submission