Hosting a custom domain on Github

Visakh Vijayan - Jan 15 '19 - - Dev Community

So we have all been there where we want to make a static website and are confused as to where to buy them from. Usually, it involves two steps -

  1. Where to get the domain name from.
  2. Where to get the hosting from.

Although there are a lot of competitors in the market choosing the best one becomes again a headache.

But the real question is Do you even need it

In today's world ... and by this, I mean the Internet world, everything is cheap you just have to find the correct shop that is giving it out.

Domain names

  1. Head over to freenom. A place which gives out free domain names.
  2. Nextraone is also a fair price website which I use to buy domain names.
  3. And then there is Godaddy like always.

Free hosting

  1. Sites like Freehosting.com or Hostinger.com.
  2. Github Pages etc.

Here is what I did to host my small website

  1. I bought a domain name from Godaddy called vjnvisakh.info. There is nothing on the site as of now though. :)

  2. Then I created a repository on Github.

  3. Added by index.html file into the repo and pushed it to the repo.

  4. Added a CNAME file containing just my domain name.

  5. Went to Godaddy and updated the DNS settings for the website as in the picture below.

  6. Went to the Github repository(web-version) and created a Github Page using the master branch.

  7. And Voila! the site was updated.

Of course, don't expect to run full-fledged PHP sites via this. But for static websites, it's an easy and cheap way of doing it.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .