IndexNow

Automate fast indexing across search engines with a powerful, lightweight IndexNow submission script.

Published: | Updated:

IndexNow is a simple, fast, and efficient Bash/Shell tool that helps webmasters submit URLs to major search engines that support the IndexNow protocol β€” including Bing, Yandex, Seznam, and Naver.

With this script, you can automate URL submission via:

  • βœ… Single URLs
  • πŸ“„ Bulk from a file
  • πŸ—ΊοΈ Sitemaps
  • πŸ” Crawled links from a webpage
  • πŸ€– GitHub Actions (CI automation)

πŸ› οΈ Quick Setup

Clone the Repository

git clone https://github.com/nexoscreation/IndexNow.git
cd IndexNow

Set Your API Key

Generate a key from IndexNow.org and create a public .txt file hosted at the root of your site.

Example:

https://yourdomain.com/your-api-key.txt

Update Configuration

Edit settings.env to match your domain and key:

HOST="https://yourdomain.com"
API_KEY="your-api-key"
KEY_LOCATION="https://yourdomain.com/your-api-key.txt"

πŸš€ Usage Examples

πŸ”— Submit a Single URL

bash scripts/indexnow.sh -u "https://yourdomain.com/page"

πŸ“‚ Submit Multiple URLs from a File

bash scripts/indexnow.sh -f urls.txt

πŸ—ΊοΈ Submit All URLs from a Sitemap

bash scripts/indexnow.sh -s "https://yourdomain.com/sitemap.xml"

πŸ•ΈοΈ Submit URLs Crawled from a Webpage

bash scripts/indexnow.sh -p "https://yourdomain.com"

πŸ” Automate with GitHub Actions

You can integrate indexnow.sh into your CI/CD pipeline to auto-submit on push events. See the example workflow in .github/workflows.


❓ Troubleshooting Guide

πŸ”΄ Bulk Submission Failed (Invalid URLs)

  • Make sure URLs match your verified HOST.
  • Use https:// and the correct domain name in settings.env.

πŸ”΄ 403 Forbidden (Invalid API Key)

  • Confirm API_KEY is correct.
  • Double-check that KEY_LOCATION is publicly accessible and content matches the key.

πŸ”΄ 429 Too Many Requests

  • Avoid re-submitting the same URLs rapidly.
  • IndexNow applies rate-limits β€” wait before retrying.

πŸ“ Log Files

  • βœ… Success log: ./logs/indexnow.log
  • ❌ Failed URLs: ./logs/failed_urls.log

πŸ” Manual Debug Checklist

  1. Verify Key File Access β†’ Open your key file in the browser:
https://www.yourdomain.com/your-api-key.txt
  1. Double-check settings.env
HOST="https://www.yourdomain.com"
  1. Reload Configuration and Retry
source ./config/settings.env
bash scripts/indexnow.sh -s "https://www.yourdomain.com/sitemap.xml"