Skip to main content

How To Host a Free Personal Website Using GitHub


(Updated: )

Note: This blog was migrated from a previous blog.

GitHub, the online git repository hosting service, has a feature called GitHub Pages that lets you host free static websites. Along with GitHub Pages, they have the GitHub Education Pack which has lots of goodies, such as a free web domain complete with an SSL Certificate from NameCheap. Once we put these things together, we can get a free website with a personalized domain.

1. Get a GitHub Account

All you need to do is go onto the GitHub’s main website github.com, enter a username, email and password. Once you’ve verified your GitHub account, go to settings Settings and on the Email tab, add a .edu email address.

2. Create an empty repository called <username>.github.io

Switch <username> with your username. Also, make sure that the repository is public or it won’t work.

3. Make Your Website

Be creative with HTML, CSS, JavaScript and other fancy frameworks you see fit or take this wackos template or any other template and change things. This most important thing you must have however is

  • A resume
  • Links to online profiles/portfolios like Dribble, Instructables, Twitter, GitHub, LinkedIn etc.
  • A list of projects or a place to find them
  • A short description and
  • Contact information. How is <bigbilliondollarunicorncompany> supposed to let you know that they want you as an intern if you don’t give them an email?

My first website was really plain, but it did its job.

4. Create a Local Git Repository

Set up Git. Once you’ve set that up, open up git in the folder where you created the website. In the git bash shell type the following commands

git init
git commit -m -a ""

git init initializes a git repository. git commit -m -a "" creates a checkpoint with all files using the -a flag. the -m flag lets us create a commit message quickly. If you left out the ‘-m’ flag, you’ll get an editor (vi) where you will type your message.

With that done, type in these commands

git remote add origin https://github.com/<username>/<username>.github.io.git
git push -u origin master

git remote add origin https://github.com/<username>/<username>.github.io.git adds a remote repository called origin at the location https://github.com/<username>/<username>.github.io.git. git push remote places your code files onto the online git repository.

Once you’ve typed all of that, choose a web browser and type .github.io and voila! Your personal website is now live.

Unlock your GitHub Education Pack and get That Free Domain

Go to the GitHub Education pack website, log in and find the link to the NameCheap link. Once there, log in and get your .me domain. Add a file called CNAME on the online GitHub repository and follow instructions on adding a custom domain by Namecheap.

Within a few hours, you will be able to go to your personal website using the free domain you got from NameCheap.

If you need to make changes to your website, use the command git pull so that you can merge the changes into the local repository, commit and push.


Wow, January is nearly over and I have made 5 blog posts this month. To be honest, my articles suck have a lot of room for improvement. Next week, I’ll reflect on my blog and my learning progress. I’ll also come up with ways in which I can improve my blog posts and learning process in the months to follow.