Repository navigation
IndexNow: notify changed pages after each production deploy - #76
Open
mattwebhub wants to merge 1 commit into
Open
mattwebhub wants to merge 1 commit into
mattwebhub wants to merge 1 commit into
Conversation
…UTH-013) After Vercel reports a successful Production deployment, a GitHub Actions job reads the live sitemaps and sends IndexNow only the URLs whose lastmod is new or later than their last notice, after a live check of each (200, no redirect, indexable, self-canonical). Journal posts and /en/journal stay with the Journal webhook. URLs with no lastmod are never sent. The first run starts from the 49 URLs sent by hand on 2026-11-02 at 14:31:44Z. Kill switch: repo variable SITE_INDEXNOW=false. Each run keeps a record artifact (state + log) and a job summary. The payload moves to lib/indexnow/submit.ts and is shared by all senders; Explore's on-approval path is unchanged and stays off.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Every time a production deploy of trytoone.com goes live, the site tells IndexNow (Bing, Yandex and the other engines that use it) which pages changed, so they recrawl them sooner. Owner decision, 2026-11-02: "the whole site, every deploy".
When it runs. Vercel already reports each deploy to GitHub. When a Production deploy succeeds, a GitHub Actions job starts. Preview deploys and
toone-landing*.vercel.appnever trigger it. Runs go one at a time, so two merges close together can't send the same page twice.What it sends. The job reads the live
sitemap.xml,sitemap-explore.xmlandsitemap-journal.xmlon trytoone.com. A URL is sent only if it has never been sent before, or if its<lastmod>is later than thelastmodit was last sent with. An unchanged page is never sent again (AUTH-013). Everything goes out in one POST tohttps://api.indexnow.org/indexnowwith the same payload as the Journal sender: hosttrytoone.com, keykpdkez871rpzxfa3q11m2d2fvpqq4cyg, keyLocationhttps://trytoone.com/kpdkez871rpzxfa3q11m2d2fvpqq4cyg.txt.What it never sends
/en/journaland Journal posts. The Journal webhook already sends those on every publish (JOURNAL_INDEXNOW, unchanged). The hub pages/en/journal/releasesand/en/journal/launchesare included because the webhook doesn't send them.<lastmod>, for example after a CLI upload with no git history (PR Sitemap: omit lastmod when the git date is unknown, never the build date (TECH-013) #74). With no date there's no proof the page changed, so nothing is sent for it.noindexinX-Robots-Tagor a robots/bingbot meta tag, and exactly one canonical that equals the URL (TECH-010, TECH-013). Dropped URLs are logged with the reason and checked again on the next run. They aren't marked as sent.https://trytoone.com.First run. It starts from the 49 URLs Authority sent by hand on 2026-11-02 at 14:31:44 UTC (HTTP 200, list SHA-256
9d3b0db2…3965). Each of them is sent again only once itslastmodis later than 14:31:44 UTC. A dry run against the live site at 14:39 UTC gave: 0 URLs to send (49 unchanged, 4 left to the Journal webhook, 0 with no lastmod).Explore approvals (
EXPLORE_INDEXNOW_ON_APPROVAL): left OFF on purposeThis PR does not turn the on-approval sender on. The variable isn't set on
toone-landingtoday, so it stays off. Explore record pages are still covered: they're listed insitemap-explore.xmlwith the record's update time aslastmod, so this job sends a newly approved or changed record once, at the next production deploy, after the same live check. Turning both on would send an approved record twice. A comment inlib/explore/indexnow.tsand in.env.examplenow says to leave it unset.The trade-off is that a record approved on a day with no deploy waits for the next deploy. If you'd rather not wait, a follow-up can add a daily run of this same job. The rules stay the same, so nothing is sent twice. It isn't included here because the decision was "every deploy".
Kill switch and record
SITE_INDEXNOWtofalse(Settings → Secrets and variables → Actions → Variables, orgh variable set SITE_INDEXNOW --body false -R io-hexagonal/Toone). Delete it or set it to anything else to turn it back on. The Journal's own switchJOURNAL_INDEXNOWis unchanged.indexnow-site-record, which haslog.md(every run so far, newest first) andstate.json(each URL with thelastmodit was sent with and when). The next run starts from that artifact.mainonly. "Dry run" is ticked by default, so it only lists what would be sent.Known limits
sitemap.xmldates are day-only (git commit day). If a page is changed again on the same day it was last sent, that second change waits until the page next changes on a later day. A follow-up can switch those dates to full timestamps if you want same-day precision.vercel --prod) aren't reported to GitHub, so they don't trigger the job. They also carry nolastmod(PR Sitemap: omit lastmod when the git date is unknown, never the build date (TECH-013) #74), so there would be nothing to send. The next Git deploy catches up.Files
.github/workflows/indexnow-site.yml: the job (trigger, record load/save, kill switch).scripts/indexnow/notify-site.ts: reads the sitemaps, selects, runs the live check, sends, writes the record.lib/indexnow/site-notice.ts: selection rules, live check, log text.lib/indexnow/baseline.ts: the 49 URLs from 2026-11-02.lib/indexnow/submit.ts: the shared payload.lib/explore/indexnow.tsnow re-exports it, so the Journal and Explore senders send exactly what they did before.tests/indexnow/site-notice.test.ts: 11 tests (added tonpm test).Checks
npm test: all suites pass, typecheck clean.npm run build: clean./en/downloads(meta noindex),/explore(308),/en/marketplace(404),/fr(X-Robots-Tag noindex).Merging releases this. From the first production deploy after the merge (the merge's own deploy), changed pages are sent automatically with no further approval. At today's state that first run sends nothing.