Vercel serves the public/ directory as static assets from the root, whatever framework you use. Commit the file once and it persists across deployments.
Step by step
- 1 Create public/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt in your project.
- 2 Put the key in it as the only content.
- 3 Commit and push — Vercel deploys automatically.
- 4 Confirm https://yourdomain.com/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt loads, then click Verify.
Watch out for catch-all rewrites (vercel.json)
{
"rewrites": [
{ "source": "/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt", "destination": "/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt" },
{ "source": "/(.*)", "destination": "/index.html" }
]
}
The key shown is an example. Yours is generated when you add the domain.
Watch out for
- Order matters: a catch-all rewrite listed first will swallow the key file request.
- Verify against your production domain, not the vercel.app preview URL — they are different hosts.
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