🚀 SitemapNow

A CLI tool to submit URLs from a sitemap to IndexNow, helping you get your website indexed faster by search engines.
✨ Screenshots
Interactive Mode
Submission Complete
📦 Installation
# Install globally
npm install -g sitemapnow
# Or run with npx
npx sitemapnow <options>
🔧 Usage
sitemapnow <sitemapLocation> [options]
Arguments
sitemapLocation
: URL or file path to a sitemap (required)
Options
-k, --key <apiKey>
: IndexNow API key (required)
-s, --site <siteUrl>
: Host of the website (if different from sitemap host)
-e, --engine <searchEngine>
: Search engine to submit to (default: api.indexnow.org)
-h, --help
: display help for command
-V, --version
: output the version number
🔑 Getting an API Key
Unlike many other APIs, you don't need to register to get an IndexNow API key. You can:
- Generate your own key using a random string generator (8-128 characters, using only a-z, A-Z, 0-9, and the dash character)
- Or create a UUID/GUID using an online generator
- Or simply create a random string manually
The key only needs to be:
- At least 8 characters long (maximum 128)
- Contain only alphanumeric characters (a-z, A-Z, 0-9) and dashes (-)
Example valid keys
b90e064309544c8b9baf4d2f3f59eaca
my-indexnow-key-2023
a1b2c3d4-e5f6-g7h8-i9j0
⚠️ Important: API Key Verification
Before using this tool, you must verify ownership of your website by hosting a key file:
- Create a text file named
your-key.txt
(replace "your-key" with your actual API key)
- The file should contain your API key as plain text
- Host this file at the root of your website (e.g., https://example.com/your-key.txt)
Without this verification file, search engines will reject your submissions!
💡 Examples
# Submit URLs from an online sitemap
sitemapnow https://example.com/sitemap.xml -k your-indexnow-api-key
# Submit URLs from a local sitemap file
sitemapnow ./sitemap.xml -k your-indexnow-api-key -s example.com
# Submit to a specific search engine
sitemapnow https://example.com/sitemap.xml -k your-indexnow-api-key -e bing.com
🌐 About IndexNow
IndexNow is a protocol that enables website owners to notify search engines whenever content on their website is created, updated, or deleted. This allows for faster indexing of your website content.
For more information about IndexNow, visit IndexNow.org.
👨💻 Development
This project uses GitHub Actions for CI. It runs tests, linting, and dependency checks on each push and pull request.
How to contribute
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
)
- Commit your changes (
git commit -m 'Add some amazing feature'
)
- Push to the branch (
git push origin feature/amazing-feature
)
- Open a Pull Request
📚 Repository
GitHub Repository
📄 License
This project is licensed under the Apache License 2.0.