Skip to content
Browse documentation

Getting started

SEO & IndexNow

When you publish a product or blog post in Webtools, the API can notify search engines (IndexNow) and optionally refresh your storefront cache so new URLs appear in sitemaps and on the homepage faster — closer to the WordPress Instant Indexing experience.

What happens on publish

  • Product publish (inactive → active) submits the product URL plus /, /products, and /sitemap.xml.
  • Post publish (including scheduled auto-publish) submits the post URL plus /, /blog, and /sitemap.xml.
  • Publish API responses never fail because indexing failed — pings are best-effort.

Requirements

  • A verified project domain (primary preferred), or settings.seo.public_base_url pointing at your live site.
  • Your live site must serve GET https://{host}/indexnow-key.txt as text/plain with the project IndexNow key on a single line.

Project settings

Configure indexing under Project.settings.seo via PATCH /api/v1/admin/projects/{project_id}. When you send settings, send the full object you intend to keep — the field replaces settings.

FieldTypeDefaultPurpose
seo.indexnow_enabledbooleantrueSet false to disable IndexNow pings.
seo.indexnow_keystringauto-generated8–128 characters [A-Za-z0-9-]. Created on first use if omitted.
seo.public_base_urlstringverified domainAbsolute origin, e.g. https://example.com.
seo.url_templates.productstring/product/{slug}Must include {slug}.
seo.url_templates.poststring/{slug}Must include {slug}. Match your storefront routes.
seo.revalidate_webhook_urlstringunsetOptional storefront cache-bust endpoint.
seo.revalidate_webhook_secretstringunsetSent as Authorization: Bearer … when set.
Example PATCH body
{
  "settings": {
    "seo": {
      "indexnow_enabled": true,
      "public_base_url": "https://example.com",
      "url_templates": {
        "product": "/product/{slug}",
        "post": "/{slug}"
      },
      "revalidate_webhook_url": "https://example.com/api/revalidate",
      "revalidate_webhook_secret": "replace-me"
    }
  }
}

IndexNow key on your site

IndexNow requires the key file on the same host as the published URLs. Fetch the key from Webtools and serve it at /indexnow-key.txt.

MethodPathNotes
GET/api/v1/storefront/projects/{project_slug}/seo/indexnow-key.txtSame auth as other storefront project reads. Returns plain text (200) or 404 when IndexNow is disabled or no public host is configured. Mirror this onto https://{your-domain}/indexnow-key.txt.
Fetch the key
curl "https://api.webtools.ng/api/v1/storefront/projects/your-project/seo/indexnow-key.txt" \
  -H "X-Project-Key: wt_pk_your_key"

Optional revalidate webhook

  • Webtools POSTs { "urls": ["https://example.com/…"] } to revalidate_webhook_url after a successful IndexNow attempt path.
  • When revalidate_webhook_secret is set, the request includes Authorization: Bearer {secret}.
  • Invalidate catalogue, home, and sitemap caches for the listed paths (or use tag-based revalidation).

Setup checklist

  1. Verify your custom domain in the dashboard, or set seo.public_base_url.
  2. PATCH /admin/projects/{project_id} with the settings.seo object (send the full settings you intend — the field replaces settings).
  3. Expose /indexnow-key.txt on the live site (proxy the storefront key endpoint or set INDEXNOW_KEY).
  4. Optionally wire /api/revalidate and set revalidate_webhook_url + secret.
  5. Publish a product or post and confirm IndexNow + cache refresh.
  6. Keep Google Search Console sitemap submission; use URL Inspection for priority pages.

IndexNow does not guarantee Google will index instantly. It helps Bing and IndexNow partners and improves discovery after publish. Google still relies on crawl, sitemap, and Search Console.

Related: Authentication · Catalogue API · Blog API