This tutorial will teach you how to host a personal website on the internet for free, plus domain fees, using, GitHub Pages, and Cloudlfare.


You will need a personal account on each of the following:


  1. Register a domain on


A Records

  1. On add the following A records to your DNS settings: Domain > DNS Records.
;; A Records    1   IN  A    1   IN  A    1   IN  A    1   IN  A

Note: Replace with your domain.

Note: Make sure you have a ‘.’ at the end of each record:


  1. On update the www CNAME record in your DNS settings: Domain > DNS Records.
;; CNAME Records    1   IN  CNAME

Note: Replace username with your GitHub username.


  1. Create a new public repository on GitHub under your personal account. I called mine personal-website. You can call yours whatever you want to.
  2. Create an index.html file on the main branch of your new repository:
        <h1>Hello, World!</h1>


  1. Enable GitHub Pages for your repository: Settings > GitHub Pages > Source > Main Branch.
  2. Configure GitHub Pages to use your custom domain: Settings > GitHub Pages > Custom Domain >

Note: Make sure you include www. in the domain name.

This will create a CNAME record in your repository the value you entered.


Use the following steps to enable ssl to secure your website by encrypting all traffic over https.

  1. Add your domain on Cloudlfare.
  2. Choose a free plan.
  3. Follow the instructions to change your nameserver on to Cloudflare: Domain > Nameserver
  4. Enable “Always Use HTTPS”: Crypto > Always Use HTTPS

Once configured your domain will automatically be redirected over https.

At this point, your DNS will transfer to Cloudflare and traffic will be redirected.


Your website will be available at your domain once your DNS changes have been propagated. This can take a few minutes or a few hours.