Index Check Ops → CI/CD integration
Wiring an Index Check API Into CI/CD
A deploy can un-index a site in one commit — a stray noindex in a layout, a robots.txt rewrite, a canonical pointing at staging. The build passed. The tests passed. The index check three days later is where it finally fails, if anyone runs one. Putting that check into the pipeline turns three days into thirty minutes.
The three pipeline checks
- Post-deploy directive scan (minutes after release). Fetch a fixed set of representative URLs per template and assert: status 200, no
noindexin meta or headers, canonical pointing where it should. Pure HTTP, no external service — this catches the regression before Google sees it. - Post-deploy index spot-check (day 1–3). A small batch check on the same representative set confirms the pages still resolve as indexed. One URL Inspection pass in Search Console is the manual equivalent — the tool's docs describe exactly what it verifies — and the batch run is the same idea, scaled and scriptable.
- Nightly standing check (cron). The money-URL list goes through the bulk index checker on a schedule; endpoints and auth for scripted submission live in the developer API docs. The job posts a delta, not a report — silence when nothing changed.
A skeleton that fits any CI
# .deploy/post-release.sh — sketch, adapt to your stack
urls=$(cat representative-urls.txt)
for u in $urls; do
hdrs=$(curl -sI "$u")
echo "$hdrs" | grep -qi "^HTTP.* 200" || fail "non-200: $u"
echo "$hdrs" | grep -qi "x-robots-tag: .*noindex" && fail "noindex header: $u"
curl -s "$u" | grep -qi '<meta[^>]*noindex' && fail "noindex meta: $u"
done
# then: submit representative-urls.txt as a batch check task via the API
# and post the verdict delta to the team channel
Failure policy: loud beats complete
The directive scan blocks the pipeline — a noindex on a money template is a broken build, full stop. The index checks don't block; they alert. Indexation moves on Google's clock, and a pipeline that waits on it will teach the team to ignore red. Block on what you control, alert on what you watch.
Pro tip: keep the representative set tiny and stable — a handful of URLs per template. The nightly standing list is where breadth lives; the pipeline set exists for speed.