Custom subdomain

Hi,

I have successfully set up a custom domain for my GitHub pages. I was wondering if I would be able to setup subdomains for some pages.

So for example instead of using my-custom-domain.com/fr I could use fr.my-custom-domain.com

Knowing that I have a CNAME file (my-custom-domain.com) at the root of my gh-pages branch, can I put a different CNAME (fr.my-custom-domain.com) in a subfolder?

Many thanks.

1 Like

As per GitHub custom domain document, CNAME file should be at root of the repository. If it works for you, try adding the new web pages into new repository and then point that sub-domain to that new repository. But the problem with this approach is new repository needs to be added whenever new sub-domain needed 

1 Like