Host Your Website For Free With “GitHub-pages”

If you are looking for a way to host your portfolio website, project website, or your business website for free, this article is for you!

Kavindu Bimsara Fernando
LinkIT
3 min readJul 10, 2020

--

GitHub-pages is a feature provided by GitHub to deploy your static websites. (Here I’m not going to discuss Git basics)

Photo by You X Ventures on Unsplash

There are two types of GitHub pages.

1. User or organization sites

The site URL will be

Files are kept in a special repository dedicated to the Github pages website.

2. Project sites

The site URL will be

These sites are connected to a specific branch of the project repository.

Benefits

Websites deployed on Github can be managed easily with basic GitHub features. GitHub automatically builds and deploys them for you.

“Our team of experts goes beyond industry standards to secure our platform.”

As GitHub itself says, Github is a secure way to keep and manage our source code.

Photo by Clément H on Unsplash

Enabling GitHub pages

  • All you need is a GitHub account.
  1. Create a project repository. (If you are creating a user site or an organization site, the repository name should be [username].github.io)
  2. People are used to creating a separate branch (gh-pages) when creating a project site.
  3. Go to repository -> settings -> GitHub Pages
  4. Select the source branch to build Github pages (If a project repository). User pages must be built from the master branch.
  5. Additionally, with a GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server accounts, users can keep their repositories private, while enabling GitHub-pages
  • Students may apply for “GitHub Student Developer Pack” which gives GitHub Pro features for free.
Private repository with Github Pages enabled using a Github PRO account
  • To make the story brief, you can create an index.html file in the relevant branch of the repository with some test code.
  • Go to the site URL (as discussed above) — You can see the website alive after GitHub finishes building the project.
  • Manage your site as a usual git project.

*Bonus

If you are willing to add a custom domain name you already own for your website,

  • Go back to the repository -> settings -> GitHub Pages.
  • Add your custom domain in the custom domain field and save.
  • Configure DNS server settings with your custom domain and Github-page site.
  • After successfully completing the configuration, check “Enforce HTTPS” for additional security (optional).

Make use of GitHub pages. Save some money.

Thank you for reading!

--

--