Home/ Tutorials/ How to host your HTML website on GitHub Pages for free

How to host your HTML website on GitHub Pages for free

GitHub is a great place for hosting your HTML websites. It’s free and you can even use your own domain names.

This document is an update of a previously published tutorial.

Create a free GitHub account

  • From your web browser, go to https://github.com.
  • Sign up for a new account (or Sign in if you already have a GitHub account. For the purpose of this tutorial, we will consider that you are a new GitHub user).
  • When you have entered your details, select the FREE plan for individuals.
  • Answer the different questions according to your situation.
  • As with most sign ups, after doing this, you will have to validate your subscription by clicking on a link received in your mailbox.
  • When it’s done, you can login to your new GitHub account.
Create a free Github account
Create a free Github account

Download and Install the GitHub Desktop Client

  • From your browser, go to https://desktop.github.com so you can download the GitHub Desktop application.
  • When the application is downloaded, install it on your system (we will not show this step in the video) and start it. 
Download and Install the GitHub Desktop client
Download and Install the GitHub Desktop client

Create your first website repository with the GitHub Desktop Client

  • From the start screen, select to Sign in to GitHub.com.
  • Enter your GitHub username or email address and your password then click on the Sign in button.
  • You are now asked to configure Git, so enter a name and a valid email.
  • Click the Continue button then click on Finish.
  • Select Create a New Repository on your Hard Drive.
  • Enter your repository Name and Description.
  • Select the Local Path on your computer hard drive.
  • You can also configure a few other options as per your needs.
Create your first website repository with the GitHub Desktop Client
Create your first website repository with the GitHub Desktop Client

Create your website project with Pinegrow

  • Start Pinegrow and create a new website project.
  • Then save the project in your local Git repository location.
  • If you switch to your GitHub Desktop application, you will see the changes already visible within your local repository.
  • Add a few elements to the design of your index page and Save the document.
Create your website project with Pinegrow
Create your website project with Pinegrow

Proceed to your first Git commit and publish on GitHub.com

  • It is now time for your very first commit.
  • Enter a summary for your commit and a full description of the changes. Then click on Commit to master.
  • Because your repository is currently only available on your local machine, you now have to publish it to GitHub.com.
  • Confirm the repository details, uncheck Keep this code private and click on Publish repository.
  • By having a look at the History tab, you can see what was committed.
  • From the browser, refresh your GitHub screen and you now see your repository.
Proceed to your first Git commit and publish on Github.com
Proceed to your first Git commit and publish on Github.com

Setup GitHub Pages and activate your live site

  • Select it, and go to the settings tab.
  • Scroll to the GitHub Pages settings.
  • Select the source of the Pages. Here, this is the Master branch.
  • The changes are automatically saved and the page is reloaded. Scroll again to the GitHub Pages settings.
  • GitHub now provides you with the URL of your website.
  • Click on the URL and you are automatically redirected to your live site which is now available for everyone.
Setup GitHub Pages and activate your live site
Setup GitHub Pages and activate your live site

Make some more changes to your website and publish the changes

  • From Pinegrow, make some changes to your project and Save it.
  • Proceed to a new commit to the master.
  • Push the commit to the origin remote.
  • And check your modifications from the browser. The changes will appear on the live site after a few minutes.
Make some more changes to your website and publish the changes
Make some more changes to your website and publish the changes

Usage limits

GitHub Pages sites are subject to the following usage limits:

  • GitHub Pages source repositories have a recommended limit of 1GB.
  • Published GitHub Pages sites may be no larger than 1 GB.
  • Hub Pages sites have a soft bandwidth limit of 100GB per month.
  • GitHub Pages sites have a soft limit of 10 builds per hour.

Read more about GitHub usage limits.

Prohibited uses

GitHub Pages is not intended for or allowed to be used as a free web hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS).

Read more about GitHub prohibited uses.

Going further

It’s totally possible to set up your own domain on GitHub Pages. Below are a few tutorials that will help you get started.

Discuss this tutorial

Have questions or comments about this tutorial? Let’s talk about it on our forum.



Last updated on April 19, 2020 at 1:01 pm



Print this article