Host your website using GitHub pages

You can host your website without purchasing a domain name. This is possible using GitHub pages. For this, just create a new repository with your and run .html file using this URL. Follow following steps to host your  website using GitHub pages.

Step 1

  1. create repository to host your website. Without this, hosting is not possibleScreenshot from 2016-05-23 21:35:08

Type your username not me 😛

2. Now add demo.html file to check whether your link is working or not.

3. If working then Done.

Step 2

Now host website using domain that you have created     

Firstly create another branch (gh-pages) of your existing repository which you want to host

  1. open desire repository, for example,  JavascriptGraphs
  2. Goto settings.
  3. click on Launch automatic page generator.
  4. click on continue to layout.
  5. Select the theme of your website.
  6. Now branch name gh-pages is created this will contain all files of your master branch.

      Screenshot from 2016-05-23 21:57:337. Now see your site using


Another way to host website via terminal.

Add new branch to existing repository

git checkout gh-pages

push changes to github

git add -Agit commit -m "Adding pages

Now see your site using

enjoy 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s