Kai Ole Hartwig
New products in the index sooner?

sylius-indexnow — new products in the index within minutes.

A new product waits until a crawler happens to come by. sylius-indexnow tells search engines through IndexNow which products, taxons and homepages were added, changed or removed. Bing, Yandex, Seznam, Naver, Yep and Amazon share every submission. Bing's index feeds ChatGPT search and Copilot.

  • Composer package:koh/sylius-indexnow
  • Built on:koh/indexnow, the framework-agnostic client
  • Sylius: 2 · PHP: 8.3+ · MIT · source on GitHub

TL;DR — Does this fit my setup?

Use it if

Do not use it if

Effort

One Composer package, one entry in bundles.php, one route, one migration. No key to generate, no file to upload.

Installation and activation

composer require koh/sylius-indexnow

 

// config/bundles.php
Koh\IndexNow\Sylius\KohIndexNowSyliusBundle::class => ['all' => true],

 

# config/routes/koh_indexnow.yaml – the key file, at the origin root
koh_indexnow:
    resource: '@KohIndexNowSyliusBundle/config/routes.php'

 

bin/console doctrine:migrations:migrate   # two small tables, shipped with the bundle

 

Then run the worker every few minutes, from cron or a Kubernetes CronJob:

 

bin/console koh:indexnow:run

 

That is the whole setup. Every enabled channel announces on its hostname.

What gets announced

ChangeAnnounced
A product, its translation, variant, price, image or taxon assignmentThe product page in every channel it belongs to and every channel locale it has a slug in, plus its main taxon's listing if that taxon is enabled
A taxon or its translationThe taxon page in every channel whose menu tree contains it
A product or taxon is deletedIts URLs, resolved before the deletion, if it was enabled
The go-liveHomepages, enabled products and enabled taxons

Changes come from Doctrine, so the admin, imports, the API and fixtures are all covered. Disabling a product is announced, because the engine has to re-crawl to learn it is gone. A product that was never public stays silent until it is enabled.

What is never announced

A submission cannot be recalled, and every participating engine receives it. So only the prod kernel environment sends anything. That is not configurable.

The library's host policy checks hosts. It refuses .localhost, .test, .invalid, .internal, IP addresses and hosts with a dev, staging or preview label. shop.dev.example.com stays silent even in prod. On a host that does not announce, the key file does not exist either.

Delivery and configuration

Changes are queued in koh_indexnow_queue and sent by koh:indexnow:run, one request per host. Accepted rows are removed. 429, 5xx, network errors and 403 (key file not reachable yet) wait with exponential backoff from one minute to six hours, honouring Retry-After, and are given up after eight attempts. 400 and 422 are removed and logged, and the command exits with status 1.

There is deliberately no Messenger message: a queue without a consumer loses messages, and a synchronous transport would put a search engine's latency into the admin's save.

Commands

 

bin/console koh:indexnow:status       # per channel host: active or why not, key file URL, queue
bin/console koh:indexnow:run          # the worker
bin/console koh:indexnow:submit-all   # queue the catalogue again

 

Configuration

Everything is optional.

 

koh_indexnow:
    enabled: true
    key: ''                    # empty: derived per host from kernel.secret
    channels: []               # channel codes; empty: all enabled channels
    denied_host_suffixes: []   # further hosts never announced
    include_homepage: true
    include_main_taxon: true
Next step

Getting new products into the index?

If new products take days before Bing and the AI search engines know them, sylius-indexnow helps. Talk to me about the setup or monitoring the submissions.

Discuss the setup →

Or email me directly: mail@ole-hartwig.eu