<p>Did you define the the locale url in your config?</p>

<p>I do it like this:</p>

<p><strong>.env</strong></p>

<pre><code>SITE_URL_DE="@web"
SITE_URL_EN="@web/en"
SITE_URL_FR="@web/fr"
SITE_URL_IT="@web/it"
</code></pre>

<p>general.php</p>

<pre><code>// Global settings
  '*' =&gt; [
    'siteUrl' =&gt; [
        'siteDe' =&gt; getenv('SITE_URL_DE'),
        'siteFr' =&gt; getenv('SITE_URL_FR'),
        'gsiteEn' =&gt; getenv('SITE_URL_EN'),
        'siteIt' =&gt; getenv('SITE_URL_IT'),
    ],
  ],
</code></pre>

<p>Then you can use those as your base URL's:</p>

<p><a href="https://i.sstatic.net/DLV0M.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DLV0M.png" alt="enter image description here"></a></p>

CC BY-SA 4.0
2018-10-02T12:00:01.660Z
Thank you for your answer. We hadn't set those variables. We have added them, however it still doesn't work. I wonder, we haven't set an index.php in the web/de folder - do we need this? 

I've added some screenshots to show how my configuration looks.
Ludwig Seufert
CC BY-SA 4.0
2018-10-02T13:23:23.640Z
You don't need to have `web/de` folders any longer in Craft 3
KSPR
CC BY-SA 4.0
2018-10-02T13:25:08.987Z
Hmm. Apart from that it looks the same. I run on apache so my guess it's an ngnix thing.
KSPR
CC BY-SA 4.0
2018-10-02T13:45:40.203Z
Seriously...that was it. We removed the de folder and now everything works fine. Thank you very much.
Ludwig Seufert
CC BY-SA 4.0
2018-10-03T06:47:01.747Z
Glad to hear. The move from a multilanguage site from `craft 2` to `craft 3` isn't that strightforward altough it's much simpler now actually.
KSPR
CC BY-SA 4.0
2018-10-04T11:30:19.237Z
I've actually run into a new problem now... It might be related though so I'll just quickly ask it here but if it's better to create a new question let me know.

When I publish the website everything seems to work, except for the homepage of the second language. Where before I got a 403, and after deleting the web/de folder it worked locally, published the web/de homepage returns a 404. If you have any more suggestion I'd love to hear them.
Ludwig Seufert
CC BY-SA 4.0
2018-10-05T11:35:12.823Z
Ugh. I would open a new question. Could be that your path's for the template are not in order.
KSPR
CC BY-SA 4.0
2018-10-02T10:47:07.357Z
2018-10-02T10:47:07.357Z
KSPR
<p>We are trying to setup a second language. We've gone through the steps and created a second website, we defined the base URL as @web/de for the second language (German). </p>

<p>The deeper sections are working fine (e.g. www.url.com/de/kontakt). However we can't get the second homepage to work on the URL www.url.com/de. We get a 403 access denied from nginx. We followed all the steps in the documentation (<a href="https://docs.craftcms.com/v3/localization.html" rel="nofollow noreferrer">https://docs.craftcms.com/v3/localization.html</a>), but can't get it to work. I assume we are missing something or forgot to do something.</p>

<p>The homepage is a single. In sections, we have left the URI blank for both, the default english site as well as the german site. The template is the same for both.</p>

<p>As a dev environment, we are using Local by Flywheel on a local workstation.</p>

<p>Here are some screenshots of our configuration:
<a href="https://i.sstatic.net/KPw6L.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/KPw6L.png" alt="enter image description here"></a></p>

<p>Site overview:
<a href="https://i.sstatic.net/k8x3z.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/k8x3z.png" alt="enter image description here"></a></p>

<craft3><localization><multi-site><language>
403 Error on homepage of second language
# 403 Error on homepage of second language

(Asked by: username_0 on 2018-10-02)

We are trying to setup a second language. We've gone through the steps and created a second website, we defined the base URL as @web/de for the second language (German).

The deeper sections are working fine (e.g. www.url.com/de/kontakt). However we can't get the second homepage to work on the URL www.url.com/de. We get a 403 access denied from nginx. We followed all the steps in the documentation (<https://docs.craftcms.com/v3/localization.html>), but can't get it to work. I assume we are missing something or forgot to do something.

The homepage is a single. In sections, we have left the URI blank for both, the default english site as well as the german site. The template is the same for both.

As a dev environment, we are using Local by Flywheel on a local workstation.

Here are some screenshots of our configuration:
[![enter image description here](https://i.sstatic.net/KPw6L.png)](https://i.sstatic.net/KPw6L.png)

Site overview:
[![enter image description here](https://i.sstatic.net/k8x3z.png)](https://i.sstatic.net/k8x3z.png)

**Tags:** craft3, localization, multi-site, language


---

## 1 answers

### Answer by username_1 on 2018-10-02. Score: 1 | Accepted answer

Did you define the the locale url in your config?
I do it like this:
.env
SITE_URL_DE="@web"
SITE_URL_EN="@web/en"
SITE_URL_FR="@web/fr"
SITE_URL_IT="@web/it"

general.php
// Global settings
  '*' => [
    'siteUrl' => [
        'siteDe' => getenv('SITE_URL_DE'),
        'siteFr' => getenv('SITE_URL_FR'),
        'gsiteEn' => getenv('SITE_URL_EN'),
        'siteIt' => getenv('SITE_URL_IT'),
    ],
  ],

Then you can use those as your base URL's:

> **Comments:**
> **username_0**: Thank you for your answer. We hadn't set those variables. We have added them, however it still doesn't work. I wonder, we haven't set an index.php in the web/de folder - do we need this?   I've added some screenshots to show how my configuration looks.  
> **username_1**: You don't need to have `web/de` folders any longer in Craft 3  
> **username_1**: Hmm. Apart from that it looks the same. I run on apache so my guess it's an ngnix thing.  
> **username_0**: Seriously...that was it. We removed the de folder and now everything works fine. Thank you very much.  
> **username_1**: Glad to hear. The move from a multilanguage site from `craft 2` to `craft 3` isn't that strightforward altough it's much simpler now actually.  
> **username_0**: I've actually run into a new problem now... It might be related though so I'll just quickly ask it here but if it's better to create a new question let me know.  When I publish the website everything seems to work, except for the homepage of the second language. Where before I got a 403, and after deleting the web/de folder it worked locally, published the web/de homepage returns a 404. If you have any more suggestion I'd love to hear them.  
> **username_1**: Ugh. I would open a new question. Could be that your path's for the template are not in order.  

---

