github GitHub Pages Creating a custom URL for your GitHub page


You will need a domain name from a registrar.

In the gh-pages branch of your project repository, or the main branch of your repository, create a CNAME file with the contents - the canonical domain.

At your registrar's domain configuration page, point your domain to your GitHub website. Set up two CNAME records (one for the root apex (@) and one for www). Both should point to or If your DNS provider does NOT support ALIAS records on the root apex (@), simply create A records that point to and


GitHub instructions for a custom domain

Stack Overflow Q&A: "Custom domain for GitHub project pages"

Audrey Watters - Using GitHub to Power A Web Project: How and Why

Alex Cican - How I moved my websites to Dropbox and GitHub

Treehouse - Using GitHub Pages To Host Your Website