Create static website with custom domain names. Perks is having your own web hosting at minimal cost. The only cost is the cost of the custom domain name.
- Github account: For hosting the static website.
- Custom domain name: Purchase domain names from GoDaddy or Namecheap etc. Alternatively, can use GitHub default url <username>.github.io
- Create new repository with following format <username>.github.io where username refers to GitHub userid.
- In the repository, go to setting: Under Theme, choose a Jekyll theme. When finish, click on Source, select master branch. A file needs to exist in repository before Source option can be selected.
- If you have purchase your custom domain, you need to configure the A records and CNAME for the domain at the registrar to point to the GitHub site. Proceed to make the necessary changes at the domain registrar website.
- Registrar (Below is using GoDaddy as example)
- Under My Products, select the domain name that will be used. Click on Manage button.
- Once in setting page, scroll down to Additional Settings and click Manage DNS
- Within the DNS management page, Add in 4 “A” row with each pointing to IP as follows:
- Add in the CNAME pointing to your repository at Github: <username>.github.io
- View link for more info on configuring domain name with goDaddy
- Similarly, see following link for Namecheap
- Note: if you setup using A records and CNAME, leave the nameservers as default.
- Once the settings are configured, return to GitHub pages to add the custom domain name
- At the setting page, add the custom domain name in the Custom Domain section.
- Tick Enforce Https (may take up to 24 hours to take effect)
- Proceed to add in contents in GitHub using markdown.
- GoDaddy default A records: 18.104.22.168