Get New Pages Crawled Fast: IndexNow for Bing and Others, Search Console for Google
A static site has no plugin to announce new pages. There are two separate channels. IndexNow is one HTTP request that tells Bing, Yandex, Naver, Seznam and Yep about changed URLs. Google isn’t on IndexNow’s list of participating engines, so for Google you use Search Console’s sitemap report and URL Inspection. This guide sets up both, with a Python script you can run from Termux after every upload.
Warnings
ImportantSubmitting asks for a crawl. It doesn’t guarantee indexing. Google says crawling can take days to weeks, and requesting the same URL again won’t speed it up. IndexNow’s FAQ says to submit only new, changed or deleted URLs. Repeat submissions of unchanged pages can get you a 429 Too Many Requests.
What You Need
- Python 3 in Termux:
pkg install python. - cPanel File Manager to upload one small text file to
public_html. - Your site verified in Google Search Console. Optional: Bing Webmaster Tools to see IndexNow submissions.
How this was tested: The submit script ran with Python 3.13 and 3.14 against a local mock IndexNow server that serves the key file and validates requests the way the spec describes. It got a 202 for a valid batch, stopped before sending when the key file was missing (404), and refused a list that mixed two hosts. The key-generation commands made a 32-character hex key file with no trailing newline. We didn’t send any live submissions to api.indexnow.org while testing.
Key → key file → submit script → Google sitemap → URL Inspection
Steps 1–3 are once. After that it’s one command per upload.
-
Step 1: Make an IndexNow key
IndexNow keys are 8–128 characters: letters, numbers and dashes. A UUID without dashes works:
python3 -c "import uuid; print(uuid.uuid4().hex)" > ~/.indexnow_key k=$(cat ~/.indexnow_key); printf '%s' "$k" > "$k.txt"; ls -l "$k.txt"
This saves the key in
~/.indexnow_keyfor the script and creates the file to upload, named after the key itself. -
Step 2: Upload the key file to your site root
In cPanel File Manager, open
public_htmland Upload the.txtfile. Openhttps://example.com/YOUR-KEY.txtin a browser. It should show only the key. IndexNow strongly recommends the root location, because a key file in a subfolder only covers URLs under that folder. Don’t block it inrobots.txt. -
Step 3: Save and run the submit script
Save this as
indexnow_submit.py. It checks that your key file is live before sending, which is the same check the search engines make:#!/usr/bin/env python3 """indexnow_submit.py - tell IndexNow search engines about new or changed pages (Byteslip). Usage: python3 indexnow_submit.py urls.txt (one full URL per line) python3 indexnow_submit.py urls.txt --dry-run (show the request, send nothing) Set INDEXNOW_KEY to your key. The key file https://HOST/KEY.txt must already be live.""" import json, os, sys, urllib.error, urllib.request from urllib.parse import urlparse ENDPOINT = os.environ.get("INDEXNOW_ENDPOINT", "https://api.indexnow.org/indexnow") def main(path, dry): key = os.environ.get("INDEXNOW_KEY", "").strip() if not key: sys.exit("Set INDEXNOW_KEY first") urls = [l.strip() for l in open(path, encoding="utf-8") if l.strip() and not l.startswith("#")] if not urls: sys.exit("No URLs in " + path) hosts = {urlparse(u).netloc for u in urls} if len(hosts) != 1: sys.exit(f"All URLs must be on one host, got: {sorted(hosts)}") host = hosts.pop(); scheme = urlparse(urls[0]).scheme key_url = f"{scheme}://{host}/{key}.txt" try: # same check the search engines make: the file must contain the key with urllib.request.urlopen(key_url, timeout=20) as r: if r.read().decode("utf-8").strip() != key: sys.exit(f"{key_url} does not contain the key") except urllib.error.URLError as e: sys.exit(f"Key file not reachable at {key_url}: {e}") body = {"host": host, "key": key, "keyLocation": key_url, "urlList": urls[:10000]} if dry: print(json.dumps(body, indent=2)); return req = urllib.request.Request(ENDPOINT, data=json.dumps(body).encode("utf-8"), method="POST", headers={"Content-Type": "application/json; charset=utf-8"}) try: with urllib.request.urlopen(req, timeout=30) as r: code = r.status except urllib.error.HTTPError as e: code = e.code meaning = {200: "OK, received", 202: "Accepted, key check pending", 400: "Bad request", 403: "Key not valid", 422: "URLs don't match host or key", 429: "Too many requests, slow down"} print(f"{code} {meaning.get(code, '')} - {len(urls)} URL(s) sent to {ENDPOINT}") sys.exit(0 if code in (200, 202) else 1) if __name__ == "__main__": args = [a for a in sys.argv[1:] if a != "--dry-run"] if len(args) != 1: sys.exit(__doc__) main(args[0], "--dry-run" in sys.argv)Run it after each upload:
export INDEXNOW_KEY=$(cat ~/.indexnow_key) printf '%s\n' https://example.com/tutorials/new-guide/ https://example.com/tutorials/ > urls.txt python3 indexnow_submit.py urls.txt --dry-run python3 indexnow_submit.py urls.txt
200means received.202means received with the key check still pending.403is a bad key,422means the URLs don’t match the host, and429means slow down. One POST can carry up to 10,000 URLs, and the shared endpoint passes your submission on to all participating engines. -
Step 4: For Google: submit your sitemap once
Google retired its sitemap “ping” URL in 2023. Requests to it now return 404. Submit the sitemap in Search Console → Sitemaps and add a
Sitemap:line torobots.txt. Google readslastmodto schedule recrawls, but only if it’s accurate, so update it for real content changes only. Google ignoreschangefreqandpriority. -
Step 5: For Google: URL Inspection for a few key pages
For a handful of important new pages, paste the URL into the URL Inspection bar at the top of Search Console, then click Request indexing. Google says there’s a quota for individual requests, and asking for the same URL more than once doesn’t speed it up. For many pages, rely on the sitemap.
Submit the hub page too
FAQ
Does Google use IndexNow?
Google isn’t listed among IndexNow’s participating search engines, so use Search Console for Google. IndexNow covers Bing, Yandex, Naver, Seznam.cz and Yep.
Do I submit to every engine separately?
No. IndexNow says engines share submissions, so one request to api.indexnow.org (or any one engine’s endpoint) reaches all of them.
Should I submit deleted pages?
Yes. IndexNow is for added, updated and deleted URLs. Make sure the deleted page returns 404 or 410 first. Google’s docs say it drops URLs that return those codes from its index.
Can I automate the Google side?
Google recommends the sitemap for many URLs, and it can be managed through the Search Console Sitemaps API. URL Inspection’s Request indexing is a manual, limited tool.
Related Byteslip guides
- Clean URLs, a Correct sitemap.xml and a Sane robots.txt — build the sitemap you submit.
- Audit Titles, Meta and Broken Links With Python — check pages before you announce them.
- Termux Cron Jobs — schedule scripts on your device.
- Run Python Scripts in Termux — Python basics for these scripts.
Official docs
Key rules, key file, POST format, 10,000-URL limit, and response codes: IndexNow documentation. Participating engines, endpoints, when to submit, and 429 errors: IndexNow FAQ. URL Inspection quota and sitemaps: Ask Google to recrawl your URLs. Ping deprecation, lastmod, changefreq and priority: Sitemaps ping endpoint is going away. Sitemap submission: Build and submit a sitemap. 404 and 410 handling: How HTTP status codes affect Google’s crawlers.
