Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: IndexNow API Support #1994

Open
GamertechAU opened this issue Feb 3, 2025 · 0 comments
Open

[Feature Request]: IndexNow API Support #1994

GamertechAU opened this issue Feb 3, 2025 · 0 comments

Comments

@GamertechAU
Copy link

Feature Description

IndexNow is a rapid indexing API originally created by MS Bing and adopted by a few other search engines. The API allows users to tell search engines about modified pages directly instead of waiting for them to crawl and discover changes themselves.

A number of CMS' include support for it by default or with a plugin and ping the appropriate search engines when modifications are made to pages. Unfortunately with Publii sites being static, that can't easily be done from the site.

However, the ping doesn't have to come from the site itself, the API accepts it from anywhere as long as there's a txt file in the site root with the engine's API key and the sent request containing the matching key.

The plan would be whenever a Publii user syncs to their website with IndexNow enabled, Publii collects the valid/configured page types that have been modified in this sync, creates a POST JSON request and pings the enabled search engines from the app itself.

Requires:

  • A new Publii settings section for IndexNow where search engines (Bing/Yandex primarily) can be toggled on and their API keys added.
  • Publii would create a txt file in the project (File Manager) with the API key as the name and contents if the user hasn't already done so.
  • When syncing a site, Publii collects valid pages that were modified in this sync and forms a JSON POST request with the respective API keys and sends to enabled search engine APIs.
  • The API responds with a 200 or other status codes. Publii may show the response if not 200, but shouldn't interrupt the sync process on ping failure if the API is down.

Warning

The Publii settings/sync UI should contain a warning/block if syncing to a public repo such as Github as the API key should remain private.
Anyone with the key can submit malicious updates to the API affecting the user's site.

API documentation available here: https://www.indexnow.org/documentation

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

No branches or pull requests

1 participant