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 insettings.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
- Verify Key File Access β Open your key file in the browser:
https://www.yourdomain.com/your-api-key.txt
- Double-check
settings.env
HOST="https://www.yourdomain.com"
- Reload Configuration and Retry
source ./config/settings.env
bash scripts/indexnow.sh -s "https://www.yourdomain.com/sitemap.xml"