DEV Community


Posted on

How to host your web applications on github pages

Github provides a free hosting service to help your websites go live online. It is called Github Pages. Github Pages builds a static website from the HTML, CSS and Javascript files in your repository. Let's see how.

(For the purpose of this tutorial, we'll assume you already know how to create a repo and add files to it.)

Step 1:
Go to your repo, click on 'Settings'

Settings Option

Step 2:
Click on 'Pages' in the left sidebar

Pages Option

Step 3:
Under the 'Source', click on 'None'.

None Option

Step 4:
From the dropdown menu, choose your main branch and click Save.

Main Branch

Step 5:
That's it! Now your site is ready to be published. Wait a couple of minutes for your site to be live on the given link!

If you want to host a web application or your personal portfolio on, create a repo with the name '' and follow the above steps.

Pro Tip:
If you want to host your custom domain on github, first enter your domain name in the 'Custom Domain' field and hit 'Save'. Then point the A record of your domain to the following ip addresses:
Enter fullscreen mode Exit fullscreen mode

Let me know in the comments if you found it helpful!

Top comments (0)