Submitting URLs to IndexNow from PHP: getting Bing and Yandex to notice new pages in hours
Google has Search Console for submitting new pages, but Bing and Yandex have something simpler: IndexNow. You make one HTTP request naming a URL, and both search engines pick it up — usually within hours. No dashboard, no per-URL form, just a POST with a key. For a small tool site where I publish new pages in batches, it is the fastest way I know to get noticed. The protocol is refreshingly…
Google offers Search Console for submitting new pages, while Bing and Yandex provide a simpler method called IndexNow. By making a single HTTP request with a URL, both search engines quickly pick up the new page – typically within hours. The process is straightforward, requiring only a POST with a key.
To get started, generate a random 32-character hex string and save it in a text file at the root of your site, such as https://example.com/2f8a1c...txt. This file serves as proof of ownership. Whenever you have new or updated URLs, post a JSON payload to https://api.indexnow.org/indexnow.
The PHP function indexnow_submit requires three elements: the host (your site's domain), the key, and the key location (the URL where the key file can be accessed). The function encodes the data into JSON and sends it to the IndexNow API using cURL. After the request, check the response code – a 200 or 202 means the submission was well-formed, but it doesn’t guarantee indexing.
Key points to remember:
1. Use one key per host, with the key file accessible at https://yourhost/ key .txt .
2. Batch URLs – up to 10,000 per request.
3. Submit from a deploy script, not from the page.
4. A 200 response confirms the submission was well-formed, not indexed.
5. Keep your key safe – rotate it by updating both copies simultaneously.
IndexNow is an efficient way for small sites, like those hosted on shared servers, to notify Bing, Yandex, and other participating search engines about newly published content.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.