Magento 2 uses pub/ as its document root on any correctly configured server. Putting the file in the project root is the usual mistake — it will never be reachable.
Step by step
- 1 Connect over SFTP to your Magento installation.
- 2 Open the pub/ directory — the one containing index.php and static/.
- 3 Upload a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt there.
- 4 If your host serves from the project root instead, put a copy there too; a duplicate is harmless.
- 5 Confirm the URL loads, then click Verify.
Flush caches after uploading
php bin/magento cache:flush
The key shown is an example. Yours is generated when you add the domain.
Watch out for
- Full Page Cache and Varnish will happily cache the 404 from before you uploaded. Flush both.
- Multi-store setups with separate domains need a key file per domain.
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