For Nepali citizens, you can register free .com.np domain. In this post, I will teach you to point this domain to Github Pages using Cloudflare DNS for free.
Mercantile Communications Pvt. Ltd. provides .com.np domain registration for free of cost and provides to use DNS service.
Step 1: Setup Github account and upload website
To upload your website into the github account you need to learn git. I am not covering the tutorial for using the git. You can refer to this site to learn git. Learn Git
First of all let us create a web site on Github. For this follow the steps below.
- Sign Up on Github, with username, email and password.
- Login to your Github Account
- Create new repository with the name username.github.io Here, don’t forget to change the username with your own github username that you used while signing up.
- This is the repository where you will upload your website.
- Have atleast index.html in this repository so, when you open username.github.io in your browser you will see your website running.
Step 2: Register your Domain Name
You can apply for new domain through the link below:
Register your free domain
To apply the domain name, you need to enter the following details in the above web site:
: yourname.com.np, just enter the domain name you want to register based on your name.
: Enter the name servers as follows.
Primary Name Server: eva.ns.cloudflare.com
Secondary Name Server: hank.ns.cloudflare.com
Since, we are using Github Pages to host our web site and Mercantile does not provide us to set up CNAME and A record for our domain.
: Enter your Email and Personal details.
: Scan and upload your citizenship document. Also write a cover letter mentioning that you want to register the domain.
After submitting all these information you will get an email confirmation from Mercantile Communications. If you do not get reply from them within a week just send them email to email@example.com
Step 3: Point your domain to Github Pages through Cloudflare
Create a free account on Cloudflare. Sign up for Cloudflare
Add a site to Cloudflare. I am not writing each an every step. Refer to the following link.
Next, after adding the site to Cloudflare, navigate to DNS tab and following record.
After adding all the records your settings will look something like this:
Step 4: Create CNAME file in your Github repository
Till this step, we have point our domain to Githubpages and we have your website running in Github Pages with url username.github.io
Now, we need to update our domain name in Github.
In your repository in Github (created in the first Step) create a file name CNAME
In that file write the name of your domain (yourdomain.com.np) as shown in the image below.
Now, you when you open “yourname.com.np”, You will see you website running.
Note that it may take, upto 72 hours for the domain DNS to be updated throughout the web.
categories: Free Stuff