Adding custom domain to github pages
- Create CNAME in domain provider website (Bigrock, godaddy)
- Here I have taken domain from bigrock.
What is CNAME ?
- It is something like creating alias for your website.
- A 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
- Login to your DNS provider website
- 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.
Using GitHub pages you can create website for your project,company or you can create portfolio.
Here Some Example of GitHub pages
- Create GitHub account
- Download Git(https://git-scm.com/downloads)
Steps to create Github Pages for your portfolio website
Create a GitHub Account
Create GitHub Account
Give Repository name same as your username followed by github.io
My Username: bhaveshlakhani
Repo name: bhaveshlakhani.gihub.io
Download Portfolio Theme from below link or you can Create template using HTML/CSS.
Or You can Download theme which i have created.
- Click here to view Demo
- 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 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