DEV Community

Tugelbay Konabayev
Tugelbay Konabayev

Posted on • Originally published at about-kazakhstan.com

Building IndexNow for Instant Search Engine Notification

What is IndexNow

IndexNow is an open protocol that lets you instantly notify search engines (Bing, Yandex, Seznam, Naver) when content changes. Unlike Google's Indexing API, IndexNow is simpler: one HTTP call, no OAuth.

Setup

  1. Generate an API key (any UUID)
  2. Host the key file at your domain root
  3. POST changed URLs to the IndexNow endpoint

Implementation

const INDEXNOW_KEY = "your-key";

async function submitToIndexNow(urls) {
  const res = await fetch("https://api.indexnow.org/indexnow", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ host: "yourdomain.com", key: INDEXNOW_KEY, urlList: urls })
  });
  return res.status;
}
Enter fullscreen mode Exit fullscreen mode

GitHub Actions Integration

Run IndexNow on every push to automatically notify search engines:

name: IndexNow
on: push
jobs:
  notify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: node scripts/indexnow-submit.mjs
Enter fullscreen mode Exit fullscreen mode

Combining with Google Indexing API

IndexNow covers Bing, Yandex, and others. Google requires its own API. Running both ensures maximum coverage.

Results

New articles appeared in Bing within hours instead of days. Yandex indexing improved from weeks to 1-2 days.

Top comments (0)