In short
A deployment is often checked in the main language, on the homepage, by the person who made it. The other languages are found broken days later, in Search Console. This task sets up a smoke test run after each production release: a sample of URLs per template and per language, checked in a few seconds on the points that matter for SEO, then compared with the previous state. Once it is in place, any regression in a language is reported within minutes of the deployment.
Why it matters
Multilingual regressions have mundane causes: a translation file missing from the build, a rewrite rule that does not know the new prefix, an environment variable that sets the default language, a cache that serves the French version on the German URL, an updated plugin that forgets the hreflang tags. They often affect only one language or one template, and therefore escape manual checks.
Search engines see them quickly. A version that returns an error, carries a noindex or has a canonical pointing to the main language can drop out of that market's index; missing hreflang tags break the link between versions. Generative engine bots that crawl the site at that moment read the same broken page. The faster the detection, the more likely the fix lands before search engines recrawl the affected pages.
What it improves
- Indexing of each language Errors,
noindexand wrongcanonicaltags are detected before they are taken into account. - Detection time A few minutes instead of several days or weeks.
- Confidence when deploying Each production release has proof that it works in every language.
- Visitors Fewer empty pages, pages in the wrong language or error pages.
- Rankings No direct effect; the test prevents losses.
How to check
The test is in place if, for the last deployment, you can show a dated report covering every language and every key template, with no errors or with errors that have been dealt with. Do the reverse exercise: deliberately break a translation on a staging environment (delete a key, add a noindex in a German template) and check that the test fails.
Quick manual check of a URL, without cookies or an Accept-Language header:
curl -s -D - -o page.html https://example.com/de/tee/gruener-tee/ | grep -i -E "^(HTTP|x-robots-tag|content-language|location)"
grep -o -E '<html[^>]*lang="[^"]*"|<link[^>]*rel="canonical"[^>]*>|<meta[^>]*name="robots"[^>]*>' page.html
grep -c 'hreflang=' page.html
How to implement
Step 1 — Build the sample
One to three URLs per template and per language are enough: regressions come from templates, rarely from an isolated page. Add a column with a text that should only appear in the right translation (buy button label, footer notice).
| url | lang | texte_attendu |
|---|---|---|
https://example.com/ |
fr | Ajouter au panier |
https://example.com/de/ |
de | In den Warenkorb |
https://example.com/en/ |
en | Add to cart |
https://example.com/thes/the-vert/ |
fr | Thé vert |
https://example.com/de/tee/gruener-tee/ |
de | Grüner Tee |
https://example.com/en/tea/green-tea/ |
en | Green tea |
https://example.com/blog/temperature-infusion/ |
fr | Température |
Fictional example, to be saved in urls.csv with these three headers (texte_attendu is the expected text). Include the homepage, a category, a product page, an article, the contact page, the pricing or cart page, and a recently translated page. Put the file under version control with the code.
Step 2 — Install the test script
This dependency-free Python script checks each URL, can replace the domain with that of a preview environment, saves a snapshot and compares it with the previous one. It exits with an error if a check fails, so it can be used in a CI pipeline.
#!/usr/bin/env python3
"""Usage: python3 smoke.py urls.csv [--base https://preview.example.com] [--save apres.json] [--compare avant.json]"""
import argparse
import csv
import json
import re
import sys
import urllib.error
import urllib.request
from urllib.parse import urlparse
MIN_HREFLANG = 3 # number of language versions expected on each page
HEADERS = {"User-Agent": "smoke-multilingue"}
class NoRedirect(urllib.request.HTTPRedirectHandler):
def redirect_request(self, *args, **kwargs):
return None
def attr(html, pattern):
match = re.search(pattern, html, re.I | re.S)
return match.group(1).strip() if match else ""
def check(url, lang, expected):
try:
with urllib.request.build_opener(NoRedirect).open(urllib.request.Request(url, headers=HEADERS), timeout=30) as r:
status, headers, html = r.status, r.headers, r.read().decode("utf-8", "replace")
except urllib.error.HTTPError as error:
return {"status": error.code}, [f"status {error.code} {error.headers.get('Location', '')}".strip()]
except urllib.error.URLError as error:
return {"status": 0}, [f"unreachable: {error.reason}"]
state = {
"status": status,
"lang": attr(html, r'<html[^>]*\slang="([^"]*)"').lower(),
"title": attr(html, r"<title[^>]*>(.*?)</title>"),
"canonical": attr(html, r'<link[^>]*rel="canonical"[^>]*href="([^"]*)"'),
"robots": attr(html, r'<meta[^>]*name="robots"[^>]*content="([^"]*)"').lower(),
"hreflang": sorted(set(re.findall(r'hreflang="([^"]+)"', html))),
}
problems = []
if "noindex" in headers.get("X-Robots-Tag", "").lower() or "noindex" in state["robots"]:
problems.append("noindex")
if not state["lang"].startswith(lang):
problems.append(f"html lang = {state['lang'] or 'missing'}")
if not state["title"]:
problems.append("empty title")
if state["canonical"].rstrip("/") != url.rstrip("/"):
problems.append(f"canonical = {state['canonical'] or 'missing'}")
if len([c for c in state["hreflang"] if c != "x-default"]) < MIN_HREFLANG:
problems.append(f"hreflang: {', '.join(state['hreflang']) or 'none'}")
if expected and expected not in html:
problems.append(f"expected text missing: {expected}")
for block in re.findall(r'<script[^>]+application/ld\+json[^>]*>(.*?)</script>', html, re.S | re.I):
try:
json.loads(block)
except json.JSONDecodeError:
problems.append("invalid JSON-LD")
return state, problems
parser = argparse.ArgumentParser()
parser.add_argument("urls")
parser.add_argument("--base", help="replaces the domain of the URLs, for example with a preview environment")
parser.add_argument("--save")
parser.add_argument("--compare")
args = parser.parse_args()
before = json.load(open(args.compare, encoding="utf-8")) if args.compare else {}
snapshot, failures = {}, 0
for row in csv.DictReader(open(args.urls, encoding="utf-8")):
url = row["url"]
if args.base:
url = args.base.rstrip("/") + urlparse(url).path
state, problems = check(url, row["lang"], row.get("texte_attendu", ""))
key = urlparse(row["url"]).path
snapshot[key] = state
for field in ("title", "canonical", "hreflang", "lang"):
if key in before and field in before[key] and before[key].get(field) != state.get(field):
print(f"CHANGE {key} {field}: {before[key][field]} -> {state.get(field)}")
for problem in problems:
failures += 1
print(f"ERROR [{row['lang']}] {url}: {problem}")
if args.save:
json.dump(snapshot, open(args.save, "w", encoding="utf-8"), ensure_ascii=False, indent=2)
print(f"{len(snapshot)} URLs tested, {failures} error(s).")
sys.exit(1 if failures else 0)
Typical use:
# before the deployment, on production
python3 smoke.py urls.csv --save avant.json
# after the deployment
python3 smoke.py urls.csv --compare avant.json --save apres.json
CHANGE lines are not errors: they flag a title, a canonical or an hreflang list that has changed since the snapshot. An intended change can be confirmed at a glance, an unexpected change stands out immediately. Set MIN_HREFLANG to the number of published languages. The regular expressions assume attributes in double quotes and in the usual order (rel before href): adjust them if your HTML differs.
The script reads the HTML served without cookies or Accept-Language, like a bot. If the site adapts the language based on these signals, see test without cookies (opens in a new tab) and test without Accept-Language (opens in a new tab).
Step 3 — Decide what to do about an error
| Error | Severity | Action |
|---|---|---|
| 5xx or 404 status on an entire language | Blocking | Roll back to the previous version, then fix |
Unexpected noindex, canonical to another language |
Blocking | Fix or roll back within the hour |
Missing or incomplete hreflang |
High | Fix the same day |
Wrong html lang, expected text missing |
High | Fix the same day; check the cache |
| Empty title on a template | Medium | Ticket, fix at the next deployment |
| Unplanned title change | To be assessed | Check with the author of the deployment |
Record each incident in the incident log (opens in a new tab).
Vercel
Versions Vercel, all plans, GitHub integration, November 2026.
Vercel sends GitHub a repository_dispatch event of type vercel.deployment.success when a deployment succeeds, with the deployment URL in client_payload.url. The workflow file must be on the default branch.
# .github/workflows/smoke-multilingue.yml
name: Multilingual smoke test
on:
repository_dispatch:
types: [vercel.deployment.success]
jobs:
smoke:
if: github.event.client_payload.environment == 'production'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.client_payload.git.sha }}
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: python3 scripts/smoke.py tests/urls.csv
To test previews as well, remove the if condition and add --base ${{ github.event.client_payload.url }}, prefixing the value with https:// if it does not contain it. If Deployment Protection is enabled, the script will need the protection bypass for automation described by Vercel. In production, the canonical points to the public domain: on a preview, the canonical check will report an expected mismatch.
Netlify
Versions Netlify, all plans, November 2026.
If you deploy with the Netlify CLI from your CI, add the script right after netlify deploy --prod, in the same job. If you deploy through Netlify's Git integration, configure an HTTP POST request notification on the successful deploy event (Project configuration > Notifications > Deploy notifications) pointing to the service that runs the test.
Laravel
Versions Laravel 12 and 13.
Add the test at the end of the deployment script (Forge, Envoyer, Deployer), after the caches have been cleared and rebuilt:
php artisan optimize:clear
php artisan optimize
python3 scripts/smoke.py tests/urls.csv --compare storage/smoke/avant.json --save storage/smoke/apres.json \
|| curl -s -X POST -H 'Content-Type: application/json' -d '{"text":"Multilingual smoke test failed"}' "$ALERT_WEBHOOK_URL"
cp storage/smoke/apres.json storage/smoke/avant.json
$ALERT_WEBHOOK_URL is the address of an incoming webhook in your team chat. The test runs on the server, after the switchover: it therefore tests the real production site, cache included.
WordPress
Versions WordPress 6.5 and later, November 2026.
On WordPress, deployments are often plugin or theme updates, which directly affect hreflang tags, translations and caches. Run the test after each batch of updates, ideally first on the host's staging environment:
python3 smoke.py urls.csv --save avant.json
wp plugin update --all
wp cache flush
python3 smoke.py urls.csv --compare avant.json
Also clear the page cache of your caching plugin (WP Rocket, LiteSpeed Cache) between the update and the second test, otherwise you are testing the old version.
Shopify
Versions Shopify, all plans, November 2026.
Before publishing a theme, test it in preview: add ?preview_theme_id=THEME_ID to the URLs of each market and each language, and check at least the switcher, the translated text and the hreflang tags. The script does not pass this parameter: do this check by hand or add the parameter to the URLs in the file. After publishing, run the script on the public URLs. Updates to translation or market apps are tested the same way.
Cloudflare
Versions Cloudflare dashboard, all plans, November 2026.
If Cloudflare caches HTML, purge the cache right after the deployment, before the test, otherwise you are testing pages served from the cache: Caching > Configuration, then “Purge Everything”, or through the API:
curl -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/purge_cache" \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'
Then run the test a second time: the pages are now served from the cache, which checks that the cache key does distinguish between languages. See check the CDN and language variants (opens in a new tab).
Tip: keep the test fast, under a minute. A slow test ends up disabled. A full crawl of the links between languages belongs in a monthly check, see test cross-language links (opens in a new tab).
Common mistakes
- Testing only the main language, or the homepage of each language without the other templates.
- Testing before the cache is purged and approving a version that is not the one deployed.
- Testing from a logged-in browser, with cookies and a preferred language, which hides language detection problems.
- Keeping the test informational only, with no severity or owner: errors pile up without being dealt with.
- Not updating the sample when a language or a template is added.
- Testing a preview and drawing conclusions about production, when the domain, cache and variables differ.
Frequently asked questions
What should you test on a multilingual site after a production release?
Test a sample of URLs covering each template in each language. For each one, check for an HTTP 200 code with no redirect, no noindex, the page's lang attribute, a non-empty title, a canonical pointing to the URL itself, all the hreflang annotations, and a text specific to the right translation. Then compare with the state before the deployment to spot unexpected changes.
How many pages should you test after each deployment?
One to three URLs per template and per language are enough for a smoke test: regressions almost always come from a template, a routing rule or a translation file, not from an isolated page. On a site with five languages and eight templates, that means forty to one hundred and twenty URLs, tested in under a minute. A full crawl of the site belongs in a separate monthly check.
Should you block the deployment if a language has errors?
After a deployment, the site is already live: the test does not block, it alerts. Classify errors by severity. An entire language returning errors, a noindex or a canonical pointing to another language justify rolling back to the previous version. An empty title on a template can wait for the next deployment. To block before going live, run the same checks in CI, on a preview.
Resources
- Vercel: deploying GitHub projects, repository_dispatch eventsvercel.com
- Netlify: deploy notificationsdocs.netlify.com
- GitHub Actions: repository_dispatch eventdocs.github.com
- Cloudflare: purge cachedevelopers.cloudflare.com
- Google Search Central: locale-adaptive pagesdevelopers.google.com
- WP-CLI: wp plugin commandsdeveloper.wordpress.org
Updated on
Topic checklist (PDF)