Adding custom domain to github pages

Adding custom domain to github pages

  1. Create CNAME in domain provider website (Bigrock, godaddy)
  2. Here I have taken domain from bigrock.

What is CNAME ?

  • It is something like creating alias for your website.
  • Canonical Name record (abbreviated as CNAME record) is a type of resource record in the Domain Name System (DNS)
  • used to specify that a domain name is an alias for another domain.

Adding CNAME for your Github page website

  1. Login to your DNS provider website
  2. Click on Manage DNS

Click on CNAME Records

Click on Add records

Host name: your domain

Value: your github page site URL

Here you can see CNAME which you have added

Now login to your Github account and Open your GitHub Repository and click on Setting

Give your custom domain name and click on save

Now if someone open your github page website it will redirect to your Custom Domain.

Creating Portfolio website using GitHub pages

Using GitHub pages you can create website for your project,company or you can create portfolio.

Here Some Example of GitHub pages



  1. Create GitHub account
  2. Download Git(

Steps to create Github Pages for your portfolio website

Create a GitHub Account

Create GitHub Account

Create Repository

Give Repository name same as your username followed by

My Username: bhaveshlakhani

Repo name:




Download Portfolio Theme from below link or you can Create template using HTML/CSS.

Or You can Download theme which i have created.

  1. Click here to view Demo
  2. Click here to download


Now Open Git bash and push your code  into GitHub repository using Simple command.

Navigate to your project folder where your index.html file is present and execute below command

Git init

Git add .

Git remote add origin YOUR_REPO_URL

Git push –u origin master

Now you can see your code in git repository

Accessing website using below URL