How to Host Your Website for Free with GitHub Pages in 4 Easy Steps!

this is an image of author Miguel Nunez
Miguel Nunez

Mon, March 15, 2021

You made a cool web application but can’t show it to your friends or family because it’s stuck on your computer? In this tutorial, I’ll show you how to easily generate a free URL for your application with GitHub Pages so you can share it with anybody, no matter where they are in the world. Just follow the four steps below.

1. Create a GitHub account

Alright, first things first, go to www.github.com and create an account.

2. Create a repository

Sign in to your account. Look in the upper right hand corner, you'll see a plus symbol, click it. Then click "New repository".

That will bring you to the following page. At this point, you can give your respository a name. Choose a name that is related to your application. If you made a calculator, for example, you can name it Calculator or Calculator-Application. If you're new to GitHub leave all other options as is for the sake of keeping this beginner friendly. Once your done naming your repository, scroll down to the bottom of the page and click on the "Create repository" button.

3. Upload the project files

Once you've created the repository, you'll see the following page. Click on the link that says "uploading an existing file".

The page below will open, drag and drop your project files. Please make sure you don't have any subfolders. For example, if your project has images, take them out of the image folder and put everything in the main folder. Keep in mind that you'll have to change the paths to the images in the code if you do this. Once your files are uploaded, scroll to the bottom of the page and click the "Commit changes" button.

4. Activate a GitHub page

You'll be brought back to this page, click the "Settings" tab.

Scroll down untill you get to the GitHub Pages section. Click on the "Check it out here!" link.

That will open up the following page. Click the "None" button and on the drop down click "main". The page will refresh and you'll see your new URL. Give it about 2 minutes for the URL to start working.

5. Enjoy

Tell all your friends and family where to find your website!

Can't get it to run?

Watch the video below, I explain everything step by step. I also point out some of the common mistakes people make that cause this process to fail.