Mobile app version of vmapp.org
Login or Join

Login to follow query

More posts by @Jennifer507

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

This can easily be done by adding a few settings to CloudFlare and then later GitHub.

7 Steps on adding a subdomain to CloudFlare


Login to Cloudflare
Use the drop-down menu in the upper left of your screen and click your domain that you want the redirect to take place on.
Click the DNS icon at the top of the screen.
Select CNAME using the drop-down options
Add the sub domain in NAME


E.g my-project

Add your unqiue GitHub username domain in Domain name.


E.g your-gibhub-username.github.io

Leave TTL as automatic and CloudFlare enabled, click Add Record button.


5 Steps on setting up GitHub Pages to use your custom sub domain for your Repository


Login to GitHub.
Under 'Your repositories', select your Project.
On your Project Repository Toolbar find and click 'Settings'.
Scroll down to section 'GitHub Pages' and select the correct branch.
A new field will be enabled called Custom domain, simply add the sub domain to this field.


E.g my-project.example.com.

Finally click the Save button.


DONE!

There is no need to enter a URL paths as the virtual host file hosted by GitHub will handle this part for you.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme