Custom Domain for your Github pages

Yes, You can add a custom domain name for your Github page. You just need some basic knowledge of git and domain configuration.

Post Thumbnail


  1. You should have your own GitHub page, If not then this article might help you.
  2. You have your own custom domain name purchased and have access to domain configuration.

Step 1: CNAME

Create React app on your local & push it on Github/Gitlab/Bitbucket.

Before start, I assume you have your Github page up & running.

First, you need to create a new file in your repository as CNAME then add your domain/subdomain name & commit.

Custom Domain for your Github pages

Step 2: Configure DNS

Now go to your Configure DNS section of your DNS provider, You need to add two “@” type A records that point to the GitHub IP's

and one “www” CNAME record that points to your URL.

Done! You did it! 🥳🍻

Custom Domain for your Github pages

For detailed information about the custom domain for Github, you can visit this article.

Heads Up: I am working on one of the cool Chrome extensions which helps to format your code easily & it's superfast It can format your code within milliseconds. on top of it, it’s completely free for use. So go & hit that Add to Chrome Button.