Answers.Body: <p>Go to your section's settings under <code>Settings &gt; Sections</code> and find the table that lists your Entry URI Formats - you'll have a row for each site. Prefix each path with the site's locale, and then /about should resolve to a 404.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-19T14:04:12.537Z
Answers.Text: When I do this I can only access the page on `mywebsite.com/en/en/about`.
  This is because the base URL for the site also contains the locale.
  When I remove the locale from the base URL I can't use the homepage at `mywebsite.com/en` anymore.
Answers.UserDisplayName: Matthias
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-19T12:57:16.807Z
Answers.LastActivityDate: 2023-09-19T12:57:16.807Z
Answers.UserDisplayName: James Smith
Body: <p>I have a website with 2 languages. Each language is setup as a different site.
  Each site has its own base URL which is defined as follows: <code>@defaultUrl/en</code> and <code>@defaultUrl/fr</code>.</p>
  <p>I have created a new single section which will be the about page with URI <code>/about</code>.
  This translates to <code>https://mywebsite.com/en/about</code>.</p>
  <p>The issue I am encountering is that <code>https://mywebsite.com/about</code> is also a valid URL.
  How can I make sure that this either throws a 404 or redirects to <code>https://mywebsite.com/en/about</code>?
  I want the locale to always be present in the URL.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-09-19T09:56:06.507Z
Comments.Text: What do you have in your section's URL path settings? It should give you per-site routing, so that /about should not exist.
Comments.UserDisplayName: James Smith
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-09-19T11:32:47.220Z
Comments.Text: In the section settings I see 2 rows. 1 for each site and the URI is `about`.
  Should I prefix this with something else?
Comments.UserDisplayName: Matthias
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-09-19T12:53:47.957Z
Comments.Text: Yes! Prefix with each site's locale slug. Then /about should 404.
Comments.UserDisplayName: James Smith
Tags: <multi-site><craft4><language><sites>
Title: Default language is accessible without locale in URL
ThreadText: # Default language is accessible without locale in URL
  
  (Asked by: username_0 on 2023-09-19)
  
  I have a website with 2 languages. Each language is setup as a different site.
  Each site has its own base URL which is defined as follows: `@defaultUrl/en` and `@defaultUrl/fr`.
  
  I have created a new single section which will be the about page with URI `/about`.
  This translates to `https://mywebsite.com/en/about`.
  
  The issue I am encountering is that `https://mywebsite.com/about` is also a valid URL.
  How can I make sure that this either throws a 404 or redirects to `https://mywebsite.com/en/about`?
  I want the locale to always be present in the URL.
  
  **Tags:** multi-site, craft4, language, sites
  
  > **Comments:**
  > **username_1**: What do you have in your section's URL path settings? It should give you per-site routing, so that /about should not exist.  
  > **username_0**: In the section settings I see 2 rows. 1 for each site and the URI is `about`. Should I prefix this with something else?  
  > **username_1**: Yes! Prefix with each site's locale slug. Then /about should 404.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-09-19. Score: 1
  
  Go to your section's settings under `Settings > Sections` and find the table that lists your Entry URI Formats - you'll have a row for each site. Prefix each path with the site's locale, and then /about should resolve to a 404.
  
  > **Comments:**
  > **username_0**: When I do this I can only access the page on `mywebsite.com/en/en/about`. This is because the base URL for the site also contains the locale. When I remove the locale from the base URL I can't use the homepage at `mywebsite.com/en` anymore.  
  
  ---
  
  