Robots.txt for Multilingual Sites: Blocking by Language Path
Crawl budget is finite. Every request a search engine wastes on admin pages, test directories, or parameter variations is a request not spent on your actual content. Robots.txt controls this, but multilingual sites require more explicit rules.
The Multilingual Trap
A simple Disallow: /admin/ seems complete. It blocks the admin directory. But on multilingual sites with language prefixes, this rule only blocks /admin/. It doesn’t touch /en/admin/, /fr/admin/, or /zh/admin/.
Crawlers treat these as entirely separate paths. The pattern match is literal. Without explicit rules for each language prefix, admin pages under language directories remain crawlable and waste budget.
Explicit Per-Language Rules
You must list each language path explicitly. If your site supports English, French, and German with /en/, /fr/, and /de/ prefixes, your robots.txt needs separate disallow lines for each.
This means maintaining rules like Disallow: /en/admin/, Disallow: /fr/admin/, Disallow: /de/admin/. Every blocked path multiplies by your language count.
For Next.js and similar frameworks, generate robots.txt dynamically. When you add a new language, the rules update automatically rather than requiring manual additions.
Avoid Wildcards Carefully
A rule like Disallow: /*/admin/ seems elegant but creates risks. Wildcards match aggressively. If you have a valid content path like /blog/admin-tools-review/, the wildcard might accidentally block it.
Wildcards also behave inconsistently across crawler implementations. What Google interprets one way, Bing might interpret differently. Explicit rules are longer but predictable.
Validation
Check Google Search Console for indexed pages that shouldn’t exist. If you see /en/people/ entries from admin interfaces appearing in crawl reports, your robots.txt has gaps.
Test new rules before deploying. Google’s robots.txt tester shows exactly what any rule blocks or allows. Verify your intended blocks work across all language prefixes before committing changes.