Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n with multiple domains exposes a lot of urls that shouldn't be available #21210

Open
sebastian-nowak opened this issue Jan 15, 2021 · 2 comments
Labels
Internationalization (i18n) Related to Internationalization with Next.js.

Comments

@sebastian-nowak
Copy link

What version of Next.js are you using?

10.0.5

What version of Node.js are you using?

15.6.0

What browser are you using?

n/a

What operating system are you using?

n/a

How are you deploying your application?

next build && next start

Describe the Bug

According to the docs, for the following i18n config:

  i18n: {
    locales: ['en', 'pl'],
    defaultLocale: 'en',
    domains: [
      {
        domain: 'example.com',
        defaultLocale: 'en'
      },
      {
        domain: 'example.pl',
        defaultLocale: 'pl'
      }
    ]
  }

and pages/index.js & pages/about.js files only the following urls should be available:

That's not the case, there are others that are accessible too:

Expected Behavior

These extra urls should correctly display 404 or at least redirect to the correct domain with the locale prefix stripped

To Reproduce

.

@sebastian-nowak sebastian-nowak added the bug Issue was opened via the bug report template. label Jan 15, 2021
@sebastian-nowak
Copy link
Author

On a side note, being able to access https://example.com/en is a strange issue on its own. I would expect that to redirect to / if using subfolder routing and to 404 when using multiple domains.

@ijjk ijjk mentioned this issue Apr 28, 2021
@balazsorban44 balazsorban44 added the Internationalization (i18n) Related to Internationalization with Next.js. label Dec 26, 2021
@balazsorban44 balazsorban44 added kind: bug and removed bug Issue was opened via the bug report template. labels Jan 20, 2022
@simplenotezy

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internationalization (i18n) Related to Internationalization with Next.js.
Projects
None yet
Development

No branches or pull requests

4 participants