Sanka for Craft CMS

Configuration

Google Indexing API

Google's API is the more involved of the two, and one step happens outside Craft.

  1. In Google Cloud, create a project and enable the Indexing API.
  2. Create a service account in that project and download its JSON key.
  3. Paste the JSON into Settings → Sanka → Service account key. A file path works too, if the web server can read it.
  4. In Google Search Console, add the service account's client email as an owner of the property.

Step 4 is the one everybody misses, and it is what a 403 means. Sanka's error message says so rather than printing the status code, because there is nothing else a 403 from this API is likely to be.

What Google says it is for

Google documents the Indexing API as being for pages carrying JobPosting or BroadcastEvent markup. In practice it is used far more widely and it works. Sanka does not pretend in either direction — the settings screen says the same thing this paragraph does, and the decision is yours to make knowingly.

Quota

The default is 200 publishes per day, and two things about it surprise people:

  • It is per Google Cloud project, not per site. Two Craft installs sharing one service account key share the two hundred.
  • It resets at midnight Pacific, not at your server's midnight. Sanka tracks the quota day in Google's zone for exactly this reason.

Sanka checks the remaining quota before assembling a batch and cuts the batch to fit. It never spends a request to discover the quota is gone.

IndexNow

Switch it on and press generate. That is the setup.

The key is 8–128 characters of letters, numbers and dashes, and Sanka serves the key file from https://yoursite/<key>.txt as a route — there is no file to deploy, and regenerating the key cannot leave a stale one behind. The engines fetch that URL to confirm you control the host, so it has to be publicly reachable: no basic auth, no staging password, no redirect.

Endpoint is a preference, not a fan-out. The participating engines share submissions between themselves, so submitting to all of them would be the same submission counted five times against five rate limits for no extra reach. Leave it on the shared endpoint unless you have a reason.

Google does not participate in IndexNow. Bing does — and Bing's index is what ChatGPT Search and Copilot answer from, which is why this engine matters more than its reputation suggests.

Rules

A rule is one line: this section, these events, these engines.

ColumnMeaning
OnDisable a rule without deleting it
SectionA section, or Every section
New / Changed / RemovedWhich events fire it
Google / IndexNow / SitemapWhere the submission goes

With no rules, saving an entry submits nothing. Rules are matched by section handle, not UID, on purpose: a rule pointing at a renamed section should stop firing loudly rather than quietly following the rename somewhere you did not intend.

Lite keeps three rules. Configure more and the settings screen refuses the save and says why, so you are told rather than quietly given something other than what you configured.

Every setting

Submitting

SettingDefaultWhat it does
Dry runonRecords what would have been sent; sends nothing
Submit automaticallyonWhether saving an entry queues anything at all
Allow unreachable hostsoffLets .ddev.site, .test and private addresses through. They will be refused by every engine — this is for exercising the pipeline locally
Cooldown300sHow long before the same URL may go to the same engine again
Retries4Attempts before a retryable failure gives up
Retry backoff60sWait before the first retry; it doubles each time
Keep submissions for90 daysRetention. Anything still waiting is never pruned

Cooldown is the setting that protects your quota. It is keyed on URL + engine + event, so an author who saves twenty times while editing spends one submission, not twenty. Set it to 0 and you will notice.

GEO (Pro)

SettingDefaultWhat it does
Serve /llms.txtoffPublishes the map
Serve /llms-full.txtoffPublishes the map with body text inlined
SummaryThe blockquote at the top of llms.txt
Sections to includeall with URLsWhich sections appear, in your order
Cache the generated files for3600sA ceiling; saving an entry clears the cache anyway
Serve /robots.txtoffLets Sanka generate robots.txt from the crawler policy
Extra robots.txt linesAppended verbatim, after the policy and before the sitemaps
Log AI crawler visitsoffRecords every request from a recognised AI agent
Keep crawler visits for30 daysRetention

If a static robots.txt exists in your web root, it is served before anything Craft routes. Sanka detects it and says so on the settings screen rather than letting the switch appear to work and do nothing.

Permissions

PermissionGrants
View submissions and crawler activityThe Sanka section, read-only
Submit URLs and retry submissionsThe submit console, the retry buttons, draining the queue
Manage the AI crawler policy and llms.txtSaving the crawler policy and verifying visits