Skip to content

ci: ping IndexNow with the URLs each deploy changed - #533

Merged
robfrank merged 1 commit into
mainfrom
ci/indexnow
Nov 12, 2026
Merged

robfrank merged 1 commit into
mainfrom
ci/indexnow

Conversation

@robfrank

Copy link
Copy Markdown
Contributor

After each production deploy, this PR submits the changed docs URLs to IndexNow, the protocol Bing, Yandex, Seznam and Naver use to learn about page changes (Google ignores it).

How it works

  • Key file. scripts/templates/d83c04689e7d448be13934efdf3c9f4d.txt holds only the key. npm run redirects copies it to the site root, as it already does for robots.txt. The key is public by design.
    • The file has no trailing newline, so end-of-file-fixer now excludes it.
    • Root .txt files are served as text/plain; charset=utf-8 (checked on /llms.txt).
  • Before the deploy. indexnow.py snapshot saves the live sitemap-*.xml files to $RUNNER_TEMP.
  • After a successful deploy. indexnow.py submit compares the new sitemaps with that snapshot and submits a URL when it:
  • No snapshot, nothing sent. If the snapshot is missing, nothing is submitted, rather than every URL. Batches are capped at 10,000 URLs.
  • Never blocks the deploy. Both steps are continue-on-error with timeouts.
    • The submit step first waits for the key file to be live (up to 10 × 15 s).
    • It retries 429 and 5xx responses with backoff, and doesn't retry 400, 403 or 422.
    • It logs each HTTP status and every URL it submits.
  • Main repo only. Both steps run only on pushes to main, scheduled runs and manual dispatch in ArcadeData/arcadedb-docs, never on PRs or forks.

Not verified

  • Cloudflare Crawler Hints. I couldn't check it: that's a zone setting and this session has no Cloudflare API access. If Crawler Hints is on for arcadedb.com, Cloudflare already sends IndexNow pings for docs.arcadedb.com and these steps are redundant: close this PR, or drop the two steps and the key file.
  • Live behavior. Tested locally: the snapshot of the live sitemaps (246 URLs), the diff logic (no change, a changed lastmod, a removed URL, a new URL) and the key lookup. I sent no POST, so the first real submission happens on the first deploy after merge. That deploy is also when /d83c04689e7d448be13934efdf3c9f4d.txt first goes live.
  • Earlier removal. core-concepts/chapter was removed by docs(seo): page titles, release version attribute, thin index pages #531, before this exists, so it won't be submitted automatically. Later removals will be.

🤖 Generated with Claude Code

Snapshot the live sitemaps before the Pages deploy, then submit the URLs
that are new, removed, or whose git-based lastmod changed. The key file
is published at the site root. Non-blocking: continue-on-error, waits for
the key to be live, retries 429/5xx, logs every HTTP status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mergify

mergify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@robfrank
robfrank merged commit c30c866 into main Nov 12, 2026
3 checks passed
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