<p>i am encountering an issue with my multilingual craft website. Locally, everything works just fine, but when i upload it to the server, i get an error page not found for every site that is not my primary website. Any idea why this is happening? Also, i am not working with different folders for every language, all my templates just have an unique version for every language. Could anyone help me?</p>

CC BY-SA 4.0
2024-12-09T14:36:54.203Z
Hey Arthur, you might want to share more information on how the multisite is set up. Interesting would be the site setup and how you assign the Urls to the sites.

I'd look at the following things first: 1. environment variables (if you maybe assigned the site urls via variable you maybe forgot to add them on production) 2. project-config: did you apply it on production, after adding the new sites?
Max Strebel
CC BY-SA 4.0
2024-12-11T07:31:15.350Z
Hello Max, so my primary website is www.example.eu, and my subsites are www.example.eu/fr or /en. I did not assign environment variables to it, I just configured the base link for every subsite in the control panel (www.example.eu/fr). I am currently working in the staging environment. The project config got applied on the staging because I changed the settings in the control panel on the staging site itself.
Arthur Depuydt
CC BY-SA 4.0
2024-12-11T11:07:31.313Z
And when I change the default site to another subsite/language, that one works and the previous does not anymore.
Arthur Depuydt
CC BY-SA 4.0
2024-12-12T08:19:32.057Z
Hm, hard to say from here. I would generally recommend to not adjust settings on stage and production, because it will be hard for you to maintain. Rather use environment variables for that (SITE_FR_URL=https://www.example.eu/fr, SITE_EN_URL=https://www.example.eu, etc.) and assign them locally. Then when you put them on stage, you just need to adjust the urls in the .env file.

If it works locally and not on production, I would guess that either the urls you use do not map to the project (/web folder) or are not assigned correctly.
Max Strebel
<multi-site>
craft multisite not working(only default site works) on server but completely works locally
# craft multisite not working(only default site works) on server but completely works locally

(Asked by: username_0 on 2024-12-06)

i am encountering an issue with my multilingual craft website. Locally, everything works just fine, but when i upload it to the server, i get an error page not found for every site that is not my primary website. Any idea why this is happening? Also, i am not working with different folders for every language, all my templates just have an unique version for every language. Could anyone help me?

**Tags:** multi-site
> **Comments:**
> **username_1**: Hey Arthur, you might want to share more information on how the multisite is set up. Interesting would be the site setup and how you assign the Urls to the sites.  I'd look at the following things first: 1. environment variables (if you maybe assigned the site urls via variable you maybe forgot to add them on production) 2. project-config: did you apply it on production, after adding the new sites?  
> **username_0**: Hello Max, so my primary website is www.example.eu, and my subsites are www.example.eu/fr or /en. I did not assign environment variables to it, I just configured the base link for every subsite in the control panel (www.example.eu/fr). I am currently working in the staging environment. The project config got applied on the staging because I changed the settings in the control panel on the staging site itself.  
> **username_0**: And when I change the default site to another subsite/language, that one works and the previous does not anymore.  
> **username_1**: Hm, hard to say from here. I would generally recommend to not adjust settings on stage and production, because it will be hard for you to maintain. Rather use environment variables for that (SITE_FR_URL=https://www.example.eu/fr, SITE_EN_URL=https://www.example.eu, etc.) and assign them locally. Then when you put them on stage, you just need to adjust the urls in the .env file.  If it works locally and not on production, I would guess that either the urls you use do not map to the project (/web folder) or are not assigned correctly.  

---

## 0 answers

