diff --git a/src/content/docs/en/guides/internationalization.mdx b/src/content/docs/en/guides/internationalization.mdx
index e210b84c37816..70b4bbdea9db8 100644
--- a/src/content/docs/en/guides/internationalization.mdx
+++ b/src/content/docs/en/guides/internationalization.mdx
@@ -170,15 +170,11 @@ Set this option when all routes will have their `/locale/` prefix in their URL a
- URLs without a locale prefix, (e.g. `example.com/about/`) will return a 404 (not found) status code unless you specify a [fallback strategy](#fallback).
-### `redirectToDefaultLocale`
+#### Opting out of redirects for the home URL
-
+Even with your default locale routes prefixed, this behaviour does not apply by default to your site's index page. This allows you to have a home page that exists outside of your configured locale structure, where all of your localized routes are prefixed except the home URL of your site.
-Configures whether or not the home URL (`/`) generated by `src/pages/index.astro` will redirect to `/`.
-
-Setting `prefixDefaultLocale: true` will also automatically set `redirectToDefaultLocale: true` in your `routing` config object. By default, the required `src/pages/index.astro` file will automatically redirect to the index page of your default locale.
-
-You can opt out of this behavior by [setting `redirectToDefaultLocale: false`](/en/reference/configuration-reference/#i18nroutingredirecttodefaultlocale). This allows you to have a site home page that exists outside of your configured locale folder structure.
+You can opt out of this behavior so that your main site URL will also redirect to a prefixed, localized route for your default locale. When `prefixDefaultLocale: true` is set, you can additionally configure `redirectToDefaultLocale: true`. This will ensure that the home URL (`/`) generated by `src/pages/index.astro` will redirect to `/[defaultLocale]/`.
### `manual`
diff --git a/src/content/docs/en/guides/upgrade-to/v6.mdx b/src/content/docs/en/guides/upgrade-to/v6.mdx
index 41552d4979312..3851c54002042 100644
--- a/src/content/docs/en/guides/upgrade-to/v6.mdx
+++ b/src/content/docs/en/guides/upgrade-to/v6.mdx
@@ -108,6 +108,31 @@ Some default behavior has changed in Astro v5.0 and your project code may need u
In most cases, the only action needed is to review your existing project's deployment and ensure that it continues to function as you expect, making updates to your code as necessary. In some cases, there may be a configuration setting to allow you to continue to use the previous default behavior.
+### Changed: `i18n.routing.redirectToDefaultLocale` default value
+
+In Astro v5.0, the `i18n.routing.redirectToDefaultLocale` default value was `true`. When combined with the `i18n.routing.prefixDefaultLocale` default value of `false`, the resulting redirects could cause infinite loops.
+
+In Astro v6.0, `i18n.routing.redirectToDefaultLocale` now defaults to `false`. Additionally, it can now only be used if `i18n.routing.prefixDefaultLocale` is set to `true`.
+
+#### What should I do?
+
+Review your Astro `i18n` config as you may now need to explicitly set values for `redirectToDefaultLocale` and `prefixDefaultLocale` to recreate your project's previous behavior.
+
+```js ins={7} title="astro.config.mjs"
+import { defineConfig } from 'astro/config';
+
+export default defineConfig({
+ i18n: {
+ routing: {
+ prefixDefaultLocale: true,
+ redirectToDefaultLocale: true
+ }
+ }
+})
+```
+
+Learn more about [Internationalization routing](/en/guides/internationalization/#routing).
+
## Breaking Changes
The following changes are considered breaking changes in Astro v5.0. Breaking changes may or may not provide temporary backwards compatibility. If you were using these features, you may have to update your code as recommended in each entry.
diff --git a/src/content/docs/en/reference/configuration-reference.mdx b/src/content/docs/en/reference/configuration-reference.mdx
index a907cadcc1a6f..c220bafec5b62 100644
--- a/src/content/docs/en/reference/configuration-reference.mdx
+++ b/src/content/docs/en/reference/configuration-reference.mdx
@@ -1549,14 +1549,14 @@ export default defineConfig({
**Type:** `boolean`
-**Default:** `true`
+**Default:** `false`
Configures whether or not the home URL (`/`) generated by `src/pages/index.astro`
will redirect to `/[defaultLocale]` when `prefixDefaultLocale: true` is set.
-Set `redirectToDefaultLocale: false` to disable this automatic redirection at the root of your site:
+Set `redirectToDefaultLocale: true` to enable this automatic redirection at the root of your site:
```js
// astro.config.mjs
export default defineConfig({
@@ -1565,7 +1565,7 @@ export default defineConfig({
locales: ["en", "fr"],
routing: {
prefixDefaultLocale: true,
- redirectToDefaultLocale: false
+ redirectToDefaultLocale: true
}
}
})