In short. Configure Netlify language conditions before broader fallback rules and account for existing files and the precedence of _redirects over netlify.toml.
Definition: As of 17 October 2026, Netlify supports language-based redirects through a
Languagecondition that matches browser language preferences. Ordered rules can select a regional destination, a broader language destination, or a fallback.
Key facts
- Netlify's redirect options documentation specifies matching against the first language in
Accept-Language, regardless of quality weighting. - Netlify's redirects overview specifies that
_redirectsrules run before rules innetlify.toml. - Netlify's shadowing documentation describes how existing files take precedence unless a rule is forced.
Where does the configuration go?
Netlify's redirects overview places the plain text _redirects file, without an extension, in the publish directory: the folder containing the finished files deployed after the build. Each rule occupies a separate line. A build or site generator must preserve this file in its output.
The alternative is an array of redirect tables in netlify.toml. This adapted example uses the documented conditions syntax and a temporary redirect:
[[redirects]]
from = "/products"
to = "/en/products"
status = 302
force = true
conditions = {Language = ["en"]}
The from path is case-sensitive; to supplies the destination. A conditions object attaches language requirements to that rule.
How do regional conditions and fallbacks work?
Netlify's language redirect examples put en-us before en: the general rule also matches preferences such as en-au. This adaptation uses 302 for temporary redirects:
/products /en-us/products 302! Language=en-us
/products /en/products 302! Language=en
Without another matching rule, a non-English or missing language preference leaves /products as the requested page. The nf_lang cookie can override browser language selection.
Netlify's rule processing order reads rules from top to bottom and uses the first match. An optional unconditional fallback therefore belongs after the language rules. For example, if /language-selector exists, this adapted line can follow them:
/products /language-selector 302!
An unconditional rule placed first handles /products before language conditions are considered. An unconditional _redirects rule also precedes language rules placed in netlify.toml.
Why might an existing page prevent the redirect?
Netlify's shadowing documentation explains that a URL matching an existing file normally serves that file. The exclamation mark in the examples forces the rule to take precedence over existing content. In netlify.toml, force = true expresses the equivalent setting.
This matters when /products already has a deployed page: forcing is a deliberate choice to replace that response with a redirect.
Related terms
- How do I add redirects with Netlify's _redirects file?
- How do I make a Netlify redirect override an existing file?
- How do I configure country-based redirects on Netlify?
FAQ
Can I use several language codes in one condition?
Yes. Netlify's redirect options accept comma-separated language codes without spaces in the condition parameter, such as Language=en,he.
Can I configure this entirely in netlify.toml?
Yes. Netlify's redirects overview documents redirect tables. You can put language rules and their fallback there, after accounting for earlier _redirects rules.
Sources
- Netlify, "Redirect options", 17 September 2026
- Netlify, "Redirects and rewrites", 14 July 2025
- Netlify, "Rewrites and proxies", 14 July 2025
Check how a page reads to answer engines. Open the GEO score analyzer