BEGINNER

IndexNow Key File: How to Create, Host & Verify It

The IndexNow key file is how search engines verify you own the domain you're submitting URLs for. Setting it up correctly is the most critical step in IndexNow implementation. Here's everything you need to know.

What Is the Key File?

The IndexNow key file is a simple plain text file that proves domain ownership. When you submit URLs with your API key, Bing fetches the key file from your domain and verifies that:

  • 1. The file exists and returns HTTP 200
  • 2. The file is publicly accessible (no authentication required)
  • 3. The file content matches exactly the key string you submitted

Without a valid key file, every IndexNow submission returns a 403 Forbidden error.

Key File Requirements

File name{your-key}.txt e.g., d47a82bc1e9f4a3b8c2d5e6f7a8b9c0d.txt
File contentsExactly the key string no HTML, no extra whitespace, no BOM, no newline at end
LocationDomain root: https://yourdomain.com/{key}.txt
HTTP statusMust return 200 OK (not 301, 302, 404, or 403)
AuthenticationMust be publicly accessible without any login or headers
Content-Typetext/plain (recommended; most servers send this for .txt files automatically)

Creating the File

Creating the key file is straightforward use any text editor:

# On macOS/Linux:
echo -n "d47a82bc1e9f4a3b8c2d5e6f7a8b9c0d" > d47a82bc1e9f4a3b8c2d5e6f7a8b9c0d.txt
# On Windows (PowerShell):
"d47a82bc1e9f4a3b8c2d5e6f7a8b9c0d" | Out-File -NoNewline d47a82bc1e9f4a3b8c2d5e6f7a8b9c0d.txt
⚠️ Common mistake: Many text editors (Notepad, TextEdit) add a newline character at the end of the file by default. Use the command-line methods above or a code editor like VS Code to ensure there's no trailing newline. Some Bing implementations are strict about exact content matching.

Platform-Specific Hosting Instructions

WordPress

Use FTP/SFTP to upload the file to your WordPress root directory (same folder as wp-config.php). Alternatively, place it in the /public_html/ folder via your hosting control panel's file manager.

Next.js

Place the file in the /public directory of your Next.js project. Files in /public are served at the root URL: /public/d47a82bc.txt → https://yourdomain.com/d47a82bc.txt

Shopify

Shopify manages key files automatically for Online Store 2.0. If using a custom theme, upload via Theme Editor → Assets or contact Shopify support for key file hosting.

Netlify / Vercel

Place the key file in your /public (or /static for Gatsby) directory. It will be deployed and served at the root path automatically.

Apache / Nginx

Upload to the web root (typically /var/www/html/ or /public_html/). Ensure the .txt MIME type is configured correctly in your server config.

Verifying the Key File

Before submitting any URLs, verify your key file is correctly hosted:

# Verify with curl
curl -I https://yourdomain.com/d47a82bc1e9f4a3b8c2d5e6f7a8b9c0d.txt
# Expected response headers:
HTTP/2 200
content-type: text/plain

The file URL should also be directly accessible in your browser, displaying only the key string.