Skip to content

redirectToDefaultLocale redirects without domain #15844

@MathiasGmeiner

Description

@MathiasGmeiner

Astro Info

Astro                    v6.0.2
Vite                     v7.3.1
Node                     v24.12.0
System                   macOS (arm64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/node (v10.0.0)
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Since the upgrade the redirectToDefaultLocale option is redirecting not correctly.
My setup:
Astro 6.0.2
@astrojs/node: 10.0.0

with npm run dev the redirect from localhost:4321 is not to the default language (e.g. http://localhost:4321/en), instead it redirects to only http://en/
I'm not able to find anything about a config change in the docs...

What's the expected result?

Redirect to http://localhost:4321/[default-language]

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-rjoc4l6x?file=astro.config.mjs

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly impacts performance (priority)pkg: astroRelated to the core `astro` package (scope)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions