Custom domain for project pages in Github

# Github is social coding website where we can host, collaborate with others on our code.
# Near month ago, I've made a repository to host CDN of SeeBeeTee in Github. But in first try I can't get working. So I've written an email to Github Support. And they've answered quickly and it just solved my problem.
Why you should host cdn or website in Github?
# There is no support for php right now.
How to?
  1. First of all make a new repository in Github of your choice like if you want to host cdn of example.com then you should name repository cdn.example.com.
  2. Clone it in your desktop via Github app... or what you used to clone repositories from github.
  3. Then delete the branch master if it's there (It's there if you checked Initialize this repository with a README and/or added .gitignore and/or added license file), and then just make a new branch called gh-pages.
  4. Then add your content there like index.html, style.css, images etc.
  5. Then add CNAME which is used to set-up sub-domain with Github, in CNAME write your sub-domain name like cdn.example.com.
  6. Commit and Push it to Github.
  7. Go to your Domain Control Panel(where you've bought your domain) and go to domain's CNAME Records.
  8. Add a CNAME record with host name like here cdn.example.com and in the value field type username.github.io. (username will be your username of Github/organization username of Github.)
  9. Then click Submit/Add Record.
# Now wait for some minutes (near 10 minutes) and your sub-domain will be hosted in Github. Enjoy.
# If you face any problem(s) while doing this you can email to Github Support or just fill this form.

Also Read

# Thank you very much for reading. Have a Nice Day :).

Labels: