I just translated my website into French. As usual, the original version of the site has its index.html file in the root directory, where is also the rest of the pages in English. I created an /fr/ folder in the root directory and put into it the French version of the index.html (naming it as such) and the rest of the pages in French.

However, if I link to example.com/fr/, I get a forbidden error, instead of automatically going to the index of the subfolder. How do I achieve a root-like behavior in the subfolder?

  • If you can use shell or a file manager of some sort, check to see if the directory/files you created are the same owner and group of the rest of the files within your web space. You may need to set ownership with chown and group with chgrp. As well, you may need to check permission to see if you have read permission. Often, it is just ownership and group that is the problem. Check that and see if that helps. Cheers!!
    – closetnoc
    Commented Jun 23, 2016 at 15:11

1 Answer 1


Every folder can have an index.html file, this is the first file your webserver will tipically look if you do not specify another file in in URI.

I have the same folder structure in my personal website as you (with Spanish instead of French) and works pretty good.

So the problem here has to do with how your server access your subdirectories or how your web framework handles routes. You should investigate in each logs errors as having an index.html in each folder isn't the problem, is a very common practice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.