Saikat Kumar Dey

Hosting on Github Pages

May 27, 2022
  • Make sure you have a CNAME file with your custom website in it. Make sure that you have it in your “gh-pages” branch.

  • Ensure that you have configured the CNAME in your DNS provider’s console. I am using Cloudflare. So, I have configured 2 records

    • CNAME to redirect “” to “”.
    • CNAME to redirect “” to “”.
  • Make sure that you set the Source of your Github Pages site to be built from the gh-pages branch. Go to Settings > Pages > Source. Check if it’s set to gh-pages. This caused me a lot of pain. It’s set to “main” by default.