How do I create a github pages directory for a custom domain?

for example, how do i create

when all i have right now is

I want to avoid using subdomains (


Hi @python8u.

This is quite simple. You can achieve this in two ways.

1.) Simply create a folder inside of the repository that you use for you root domain. Example below.

 As you can see, inside my root domain repository, I have another folder named “contact” and if you go to or , it’ll use the code inside that “contact” folder.

2.) Another approach to this is simply by creating a new repository, named whatever you want the path to be( After you create a repository with the path’s desired name, you have to go to “Settings” then to find “GitHub Pages” then select the “Source” as what you selected as source in your root domain repository. Then, after pressing “Save,” it should work!

Example: I want, then I would create a repository named “test” and activate GitHub Pages under settings using the instructions above.

1 Like