Validate HTTP Status Code
Ensure pages return the expected HTTP status code.
The Problem
A common pSEO failure mode: the template renders a pretty 200-OK page for a city/product that doesn’t exist in your database. Or worse, your CDN starts returning 503s under load. This assertion catches status code mismatches before Google indexes them.
The Hard Way
curl each URL and check the response code. Trivial for one page, tedious for hundreds.
The SEODiff Way
One API call. Results in under 2 seconds.
POST https://seodiff.io/api/v1/agent/evaluate
{"urls": ["https://example.com/city/springfield"], "assertions": [{"rule": "status_code", "value": 200}]}| Parameter | Type | Example |
|---|---|---|
value | integer (HTTP status) | 200 |
Code Examples
Copy-paste examples in your preferred language:
cURL
See the full evaluation example in cURL →
Python
See the full evaluation example in Python →
Node.js
See the full evaluation example in Node.js →
Go
See the full evaluation example in Go →
PHP
See the full evaluation example in PHP →
Related Assertions
no_noindex
Ensure pages are indexable and don't have stray noindex directives.
has_h1
Ensure every page has exactly one H1 heading tag.
Use in CI/CD
Add this assertion to your deployment pipeline. Works with any CI platform:
🐙 GitHub Actions
Block bad deployments with automated SEO checks in your GitHub Actions CI/CD pipeline.
🦊 GitLab CI
Add automated SEO quality gates to your GitLab CI/CD pipelines.
▲ Vercel
Automatically validate SEO on every Vercel preview deployment before promoting to production.