Use a separate URL for each language

Give every language version its own stable URL. Use a subdirectory or subdomain consistently, do not auto-redirect the first request by browser language, and offer a visible language switcher. Keep one canonical per language and annotate the set with hreflang.

mediumIn codeimpact effort

Why this matters

Locale must be addressable, shareable and crawlable.

Get the full breakdown

The extended brief explains when this works, when it does not, and the trade-offs. Join the waitlist and it unlocks for every tip when sign-in opens; MCP access is the paid part.

Join the waitlist

Before you start

  • A localization strategy
  • Routing control for locale prefixes

How to apply it

  1. Choose the locale URL pattern

    Pick subdirectories or subdomains and document the pattern. Apply it to every route, including the homepage, so all locales are addressable.

    Check: Each locale has a unique URL and the homepage exists for every locale.

  2. Remove forced browser-language redirects

    Serve the requested URL and offer a suggestion banner plus a persistent switcher. Do not use Accept-Language to redirect the first request.

    Check: curl with Accept-Language: fr against the English URL returns 200 English content, not a redirect.

  3. Canonicalize and annotate

    Each locale page self-canonicalizes and lists all locales with hreflang. Add every locale URL to the sitemap once.

    Check: A sampled locale page returns its own URL as canonical and the full hreflang set.

Get the prompt for your agent

A ready-to-paste prompt for your agent that implements this tip and verifies the result in your repo.

Join the waitlist

Source: seo-mcp playbook · curated entry · report an error

Framework notes

nextjs-app

Use `app/[lang]/` with middleware that rewrites to the locale segment without redirecting on the first request; set `alternates.canonical` per locale.

nuxt

Configure `@nuxtjs/i18n` with `strategy: 'prefix_except_default'` and disable `detectBrowserLanguage` redirects for crawlers.

Official references

Let your agent apply this + 161 more tips.

Pre-order — $19