Point custom subdomain and root domain to GitHub Pages


I followed the steps below to point my root domain zean.be and the custom subdomain www.zean.be to a GitHub Pages project.


Step 1: configure your GitHub Pages project to accept requests from your custom domains.

Create a file called CNAME in the root directory with the following two entries (with zean.be replaced by your own domain),


These two entries tell GitHub to redirect any requests to USERNAME.github.io to the domain specified in the CNAME file.

There are two entries to ensure that www.zean.be will also redirect to zean.be.

Step 2: add DNS records to point your root domain/subdomain to GitHub.

Add the following CNAME record to your DNS provider,

www.zean.be    CNAME    USERNAME.github.io

and add the following A records for the root domain,

@    A
@    A
@    A
@    A