How to Fix the Rank Math IndexNow API 403 Error
Step-by-step fixes — from API key regeneration to manual file upload via cPanel
.txt file wasn’t created automatically — usually from a plugin conflict or a caching issue. Go to Rank Math SEO → Instant Indexing → IndexNow API Settings → API Key, hit Change Key, clear your site cache, then click Check Key. If the key page doesn’t load, manually upload a [your-api-key].txt file to your site’s root directory. That’s the fix for most users.
You set up Rank Math’s IndexNow feature, you submit a URL, and then you see it — a 403 error sitting in your Instant Indexing history. It’s annoying, especially when you just published something you want picked up by Bing fast. I’ve hit this exact issue myself, and after digging through the Rank Math support threads and their documentation, there’s a clear pattern: it almost always comes down to the API key file.
This guide walks you through every confirmed fix, in order from easiest to more involved. No fluff — just the actual steps.
What Does the 403 Error Actually Mean Here?
In the context of Rank Math’s IndexNow feature, a 403 response doesn’t mean your account is blocked or your API credentials are wrong at a service level. It specifically means the search engine (Bing, primarily) tried to verify your site ownership by checking your API key file at a URL like:
…and got denied access. Either the file doesn’t exist, or something on your server is blocking it. That’s the core of the problem.
Why Does This Happen?
🔴 API key file not created
Rank Math tries to auto-create the key file on your server, but a plugin conflict can silently prevent it. No file = 403 every time.
🔴 Caching plugin blocking the file
Heavy caching setups (WP Rocket, W3 Total Cache, server-side caching) sometimes serve stale responses or block direct file access.
🔴 Security plugin or .htaccess rule
Firewalls like Wordfence, or custom .htaccess rules, can block access to .txt files in the root directory.
🔴 Outdated plugin version (pre-Nov 2025)
A bug in older Rank Math builds meant the API key change wasn’t saving properly. The old key stayed active. Updating fixes this.
🔴 Site URL mismatch
If your WordPress address is www.domain.com but you’re submitting from domain.com (no www), the key association breaks.
🔴 robots.txt blocking the key path
If your robots.txt disallows the key file’s URL path, search bots can’t reach it to verify ownership.
Step-by-Step Fixes (In Order)
Fix 1 — Update Rank Math First
Before anything else: if you’re running Rank Math version prior to v1.1.22 (released November 21, 2025), update it. That release patched a specific bug where regenerating the API key in IndexNow settings wasn’t actually saving the new key — the old one just stayed put. If that’s your version, all other troubleshooting is wasted effort.
Go to WordPress Dashboard → Updates and get Rank Math on the latest version. Also update the standalone “Instant Indexing” plugin if you have it separately.
Fix 2 — Regenerate the API Key
- Navigate to Rank Math SEO → Instant Indexing In your WordPress admin sidebar, hover over the Rank Math menu and click Instant Indexing.
- Open IndexNow API Settings → API Key You’ll see your current auto-generated API key displayed here.
- Click “Change Key” This forces Rank Math to generate a new key and attempt to re-create the key file on your server.
- Clear all caches Go to your caching plugin (WP Rocket, W3 Total Cache, etc.) and purge everything. Also clear your host’s server-side cache if applicable.
- Click “Check Key” A new browser tab opens to the API key URL. If your API key text appears, you’re good. If it 404s or gives an error, move to Fix 3.
Fix 3 — Manually Upload the API Key File via cPanel
This is the most reliable fix when the automatic file creation keeps failing. The idea is simple: create the key file yourself and put it exactly where Rank Math expects it.
- Copy your current API key From Rank Math SEO → Instant Indexing → API Key. Copy the full key string — it looks like a long random hex string.
-
Create a plain text file on your computer
Open Notepad (Windows) or TextEdit in plain text mode (Mac). Paste only the API key — no spaces, no line breaks, nothing else. Save the file and name it exactly:
[your-api-key].txt— replacing [your-api-key] with the actual key string. -
Log in to cPanel → File Manager
Navigate to your
public_htmlfolder. This is your site’s root directory. -
Upload the .txt file
Click Upload in the top toolbar, then select your API key file. It should land at
public_html/[your-api-key].txt. -
Verify it loads in a browser
Go to
https://yourdomain.com/[your-api-key].txt— you should see just the key text in a blank browser page.
/public_html/ or /www/) and transfer the file there. Make sure the file permission is set to 644 — readable by the server but not writable by everyone.
Fix 4 — Check Your robots.txt File
This one catches people off guard. If your robots.txt has a broad disallow rule, it might be blocking search engine bots from accessing the API key file even when the file exists. Open your robots.txt at yourdomain.com/robots.txt and look for any rules that might match your key file URL.
User-agent: *
Disallow: /
# Also risky if your key path matches
Disallow: /*.txt$
If Rank Math is managing your robots.txt, you can check it under Rank Math SEO → General Settings → Edit robots.txt. Make sure nothing there blocks /*.txt files in the root.
Fix 5 — Check for Site URL Mismatches
IndexNow links your API key to a specific domain. If WordPress thinks your site is at https://www.domain.com but you submit URLs from https://domain.com, there’s a mismatch and verification fails.
Go to WordPress Dashboard → Settings → General and check both “WordPress Address” and “Site Address.” Both should match exactly what you see in your browser’s address bar when visiting your site — including or excluding “www” and confirming the https:// prefix.
Fix 6 — Temporarily Disable Security Plugins
Security plugins like Wordfence sometimes block file access from external crawlers. As a test: temporarily deactivate your security plugin, try the Check Key button again, and see if the file loads. If it does, add an exception rule in the security plugin to allow access to your API key URL.
Comparing Common 403 Scenarios
| Symptom | Likely Cause | Fix | Difficulty |
|---|---|---|---|
| 403 immediately after setup | Key file never created | Regenerate key + clear cache | Easy |
| 403 after key regeneration | Old plugin version bug | Update Rank Math to latest | Easy |
| Check Key → blank/404 page | File missing from root | Manual cPanel upload | Medium |
| Check Key works but still 403 | robots.txt blocking bots | Edit robots.txt exceptions | Medium |
| 202 → 403 after a few days | Cache cleared key file | Re-upload + exclude from cache | Medium |
| Resets to 403 repeatedly | Plugin conflict | Disable plugins one by one to isolate | Hard |
| 403 on some URLs, not others | URL / domain mismatch | Fix WordPress Site Address settings | Easy |
Is IndexNow With Rank Math Worth It?
Even with the occasional 403 headache, IndexNow is genuinely useful if you publish content that you want indexed fast. Here’s an honest take:
✅ Pros of Using IndexNow
- Pages can appear in Bing within minutes of publishing
- Fully automatic once set up correctly — no manual pinging
- Free to use, no API usage limits for normal sites
- Works across Bing, Yandex, and other IndexNow-compatible engines
- Easy to track via Rank Math’s submission history log
❌ Cons / Limitations
- Google does not support IndexNow — separate process needed
- 403 errors can silently block submissions for days
- Caching plugins can delete the key file unexpectedly
- Rate limits apply at high submission volumes
- Bing indexing doesn’t guarantee ranking — just crawling
How to Stop the 403 From Coming Back
Getting the error fixed once is one thing. The more common frustration is it coming back. Here’s how to make sure your IndexNow setup stays healthy:
- Exclude your API key .txt file from your caching plugin’s purge rules — check for a “never cache” list in your caching plugin settings
- After uploading the key file manually, bookmark the URL and check it monthly to make sure it still loads
- Set your WordPress updates to auto-apply Rank Math minor versions so you always have bug fixes
- After any major server migration or domain change, regenerate the API key and re-upload the file
- If you switch themes or do major plugin cleanups, verify the key file still exists in your root directory
Frequently Asked Questions
/public_html/, /httpdocs/, or /www/ depending on the host. Drop the key file there with 644 permissions.Using Rank Math?
Get Your IndexNow Setup Working Properly
Follow the steps above — most 403 errors take under 10 minutes to fix once you know the cause.
Official Rank Math Fix Guide → Download Instant Indexing Plugin