# 404.html page for the root while translation is used

**URL:** <https://discourse.gohugo.io/t/404-html-page-for-the-root-while-translation-is-used/13450>\
**Category:** support\
**Created:** [August 8, 2018, 2:56pm UTC](https://discourse.gohugo.io/t/404-html-page-for-the-root-while-translation-is-used/13450 "2018-08-08T14:56:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdsgdjsgjsd](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jdsgdjsgjsd](https://discourse.gohugo.io/u/jdsgdjsgjsd)\
**Post date:** [August 8, 2018, 2:56pm UTC](https://discourse.gohugo.io/t/404-html-page-for-the-root-while-translation-is-used/13450/1 "2018-08-08T14:56:35Z")

</div>

Hello,

That’s great to use Hugo, I really loved it and handled many cases with the docs. Thanks.

Now, I’m in a problematic situation that I can’t find a solution. Here is the details:

My Hugo website supports two languages in the different sub roots;  
mysite.ext/en  
mysite.ext/de

When someone visits my website mysite.ext, it redirects to the mysite.ext/en/ because my `defaultContentLanguageInSubdir` is `true`. In this case, 404.html problems happen for the GitLab pages service and maybe for the other services too.

I’m using GitLab pages as explained in the Hugo docs. When I go to a page that doesn’t exist on my website, let’s say mysite.ext/en/this-page-doesn-t-exist/, GitLab shows its own 404 pages, not mine… Because the 404.html files are located in the sub folders for each language (/en/404.html and /de/404.html, not in the root folder of whole website (/404.html), I guess the problem is that… Because if I make the `defaultContentLanguageInSubdir`; `false`, it shows 404 pages correctly, here is why; because in this case, Hugo locates the 404.html file in the root folder when I publish the website.

How can I handle this kind of problem?  
I need your help.

---

<div class="post-metadata">

**Author:** ![Zde](https://avatars.discourse-cdn.com/v4/letter/z/a6a055/32.png) [@Zde](https://discourse.gohugo.io/u/Zde)\
**Post date:** [April 7, 2020, 3:12pm UTC](https://discourse.gohugo.io/t/404-html-page-for-the-root-while-translation-is-used/13450/2 "2020-04-07T15:12:56Z")

</div>

Thread with solution : [Global 404 page for a multilingual site](https://discourse.gohugo.io/t/global-404-page-for-a-multilingual-site/20979)

---

<div class="post-metadata">

**Author:** ![pointyfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pointyfar/32/5797_2.png) [@pointyfar](https://discourse.gohugo.io/u/pointyfar)\
**Post date:** [April 8, 2020, 12:13am UTC](https://discourse.gohugo.io/t/404-html-page-for-the-root-while-translation-is-used/13450/3 "2020-04-08T00:13:27Z")

</div>


