Skip to content

fix: use only the docs.truecalc.app token in BingSiteAuth.xml - #59

Merged
hhimanshu merged 1 commit into
mainfrom
fix/bing-siteauth-single-token
Aug 5, 2026
Merged

fix: use only the docs.truecalc.app token in BingSiteAuth.xml#59
hhimanshu merged 1 commit into
mainfrom
fix/bing-siteauth-single-token

Conversation

@hhimanshu

@hhimanshu hhimanshu commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Problem

Bing rejects verification of https://docs.truecalc.app/ with:

Incorrect authentication key: please make sure the authentication file contains the
following verification key: 8C5913DDDB5710E055911488CB4A9E96

— even though the file did contain that key, and was served correctly:

$ curl -A "Mozilla/5.0 (compatible; bingbot/2.0; ...)" https://docs.truecalc.app/BingSiteAuth.xml
<?xml version="1.0"?>
<users>
	<user>4A2DF37AEACD708CD051F4D161C07367</user>
	<user>8C5913DDDB5710E055911488CB4A9E96</user>
</users>

Ruled out as causes: wrong content-type (application/xml ✅), stale CDN cache (last-modified
after deploy, retried past the 600s max-age), and user-agent cloaking (bingbot sees the same
bytes).

Bing reads the first <user> element rather than matching against all of them, so the older
token shadowed the one being verified. #58 appended the new token on the assumption that
multiple tokens are checked — that assumption was wrong.

Fix

Keep only the token for the site actually being verified.

<?xml version="1.0"?>
<users>
	<user>8C5913DDDB5710E055911488CB4A9E96</user>
</users>

Dropping the old token costs nothing: it verified https://truecalc.app/, whose apex has no
A, AAAA, or CNAME records
, so Bing could never crawl that property and its verification was
inert.

$ dig +short truecalc.app A      # (empty)
$ curl https://truecalc.app/     # connection failed

How to test

After deploy:

curl -s https://docs.truecalc.app/BingSiteAuth.xml
# expect exactly one <user>: 8C5913DDDB5710E055911488CB4A9E96

Then Bing Webmaster Tools → https://docs.truecalc.app/Verify. Allow up to 10 minutes
for the previous response to fall out of cache (cache-control: max-age=600).

XML validated well-formed with a single-token assertion locally.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Bing rejected verification with 'Incorrect authentication key' while the file
held two <user> entries, even though the required token was present and the
file was served correctly to bingbot. Bing reads the first <user> element
rather than matching against all of them, so the previous token shadowed the
one being verified.

Drops the old token. It verified https://truecalc.app/, whose apex has no DNS
records at all, so that property could never be crawled and its verification
was worth nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hhimanshu hhimanshu self-assigned this Aug 5, 2026
@hhimanshu
hhimanshu merged commit d239c0c into main Aug 5, 2026
2 checks passed
@hhimanshu
hhimanshu deleted the fix/bing-siteauth-single-token branch August 5, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant