The catch on Drupal is knowing which folder is actually public. Drupal 8 and later put the document root in a web/ subdirectory, so a file in the project root will never be served. Composer-based installs almost always use web/.
Step by step
- 1 Connect over SFTP or open your host's file manager.
- 2 Find the folder containing index.php and the core/ directory — usually web/, sometimes docroot/ or html/.
- 3 Upload a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt there. Do not put it in sites/default/files.
- 4 Visit https://yourdomain.com/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6.txt to confirm it loads as plain text.
- 5 Click Verify in your Index-now dashboard.
Not sure which folder? Check from the command line
# The document root is the folder containing index.php and core/
ls -d web docroot html 2>/dev/null
find . -maxdepth 2 -name index.php -not -path './vendor/*'
The key shown is an example. Yours is generated when you add the domain.
Watch out for
- Clear the Drupal cache after uploading if a route module intercepts unknown paths.
- On Drupal multisite, each domain is a separate host and needs its own 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