Menu

Ping IndexNow only when your self-hosted deploy is actually live
📰

Ping IndexNow only when your self-hosted deploy is actually live

DEV Community: nextjs·Arif·2 days ago
#gQ85QxHj
#devtonextjs#devto#dev#commit#indexnow
Long article (1229 words) — no AI summary yet.
Reading 0:00
15s threshold

If you host your own Next.js site (Coolify, Dokku, a plain VPS with Docker) you lose one thing Vercel gives you for free: a clear "this commit is now live" event. That matters the moment you want to do something after a deploy, like telling search engines your pages changed.

IndexNow is the protocol Bing, Yandex, Seznam and Naver share: one POST with a list of URLs, and all of them hear about it. If you send it too early, while the old container is still serving, the crawler can arrive, fetch the old page and decide nothing changed.

Here's the small setup I use on a German photo site, FotoKlar : a health endpoint that reports the deployed commit, and a GitHub Action that waits for that commit before it pings IndexNow.

1. A health endpoint that knows its commit

Coolify can pass the Git commit into the build as SOURCE_COMMIT (the "Include Source Commit in Build" option).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.