Host .com.np domain for free
Today, we are going to learn how to host your personal
.com.np site on free. For this purpose, we are going to use
githubpages and a
.com.np domain.Before moving on you should have .com.np domain already registered. I assume that you have complete working knowledge of github. Lets roll now !!
Note: This trick works only for static pages.
a) Go to your
github account and create a repositroy named whatever you like.
b) Initialize the project on your local folder that you want to push on the github. Along with your folder contents, add a new file called
CNAME and add your domain name in it. In my case I have added jeevanchapagain.com.np as my CNAME.
Reminder: CNAME has no any file extension and must be in uppercase.
c) Now push your files to the repo you just created before. Before pushing, switch no new branch
git branch gh-pages
git checkout gh-pages
We are switching on branch gh-pages as the static file can be hosted only on gh-pages.
a) Goto CloudFlare and signup using free plan.
b) Click on
Add site at the top right,
c) Add your domain name and begin the scan.
d) Wait for some minute to complete the scan. Once the scan is completed click on
e) We need to add two
A records as we want our domain to point to github pages. Let’s get it done.
f) For first
A record add your domain name in
Name field and in
IPV4 address field add
g) For second
A record do as the previous but in
IPV address field add
Don’t forget to add
CNAME record to point your domain name with or without www to same location.
Click on Continue and choose a free plan.
If you followed the above process correctly, CloudFlare suggests you to update your
nameserver with their
To update the
nameserver provided by
CloudFlare go to
MOS site and update it as told by cloduflare.
Once you have finished updating the nameserver on MOS site, return back to cloudflare and complete the rest of the process. It will take a while to complete the process.
By following this process, you can easily host your .com.np static site on Github-pages using cloudflare.