Hosting with GitHub Pages
Tags: hosting, github, domain, website
Published: 2019-06-09 04:25:56

---
title: Hosting with GitHub Pages
published: true
description: Learn how you can host for free with GitHub Pages!
tags: Hosting, Github, Domain, Website
cover_image: https://i0.wp.com/rightfrombasics.com/wp-content/uploads/2018/11/github.jpg
canonical_url: https://rightfrombasics.com/posts/hosting-with-github-pages/
series: Hosting
---

Did you know you can host websites with GitHub Pages? In fact, so far, all my websites have been hosted with GitHub Pages. See my [Projects](http://harishv7.github.io/projects). All the websites there under the domain [harishv.me](http://harishv.me) are hosted under GitHub Pages. Let's see why is it so awesome.

### The Great Stuff

#### 1. It’s free!
GitHub Pages offers free hosting of your websites/apps etc. That’s right, its totally free. (There’s a catch though, check the limitations below). 

#### 2. Connected to your Git repository
Version control is crucial for any project you do. GitHub Pages is connected with your GitHub repository, which means once any changes are pushed, your website is automatically rebuilt and deployed for you. The individual sub-pages that see - [my blog](http://harishv.me/blog/), [my projects](http://harishv.me/projects/), [my photography page](http://harishv.me/photography/) are all individual GitHub repositories. The main page is a GitHub repository named `<your-github-username>.github.io` on the `master` branch. To deploy other repositories under your GitHub Pages domain, you simply push your changes to a `gh-pages` branch.

#### 3. Custom domain names
By default GitHub Pages offers the domain `http://<your-github-username>.github.io`. This is good enough for many hobbyists to try deploying their local projects on the web. But if you want a custom domain, you can do that too. Simply register for a domain name on sites like [Namecheap](http://namecheap.com/) or [GoDaddy](http://godaddy.com/) and connect them to GitHub pages. My site domain [harishv.me](http://harishv.me) is registered on Namecheap and connected to my GitHub repositories.

#### 4. Jekyll blogging support
GitHub Pages supports Jekyll, which means you can create blogs and deploy them. Jekyll is a powerful [Markdown](https://en.wikipedia.org/wiki/Markdown)-based blogging tool. All you need to do is run a few Jekyll commands after writing your posts and Jekyll builds static sites which you can easily push to GitHub. My [blog](http://harishv.me/blog/) is built with Jekyll as well. It’s a great way for people who prefer pure code-style of blogging. Also, all your posts can be easily backed up as they are all in a text-based Markdown format. 

#### 5. Great Uptime
GitHub is almost always up with some rare cases of downtime. This means that it provides reliable service in ensuring your webpages are live 99% of the time. That’s one huge bonus for a free service. You can check on the GitHub system status [here](https://status.github.com/).

### Limitations

This is a rather short section since there aren’t many disadvantages I can think of. There are rather limitations with GitHub Pages.

#### 1. Only Hosts Static Sites
While its true that GitHub Pages offers free hosting, it does not support full-fledged dynamic sites. Rather you can only host static sites which means they are in pure HTML, CSS and JavaScript. Essentially, there is no server-side support where you can for example do database-related operations etc. Nevertheless, this alone is powerful enough for some projects. All my pure front-end based projects are hosted with GitHub Pages. I have made many of those with the combination of HTML, CSS, JavaScript, libraries such as ReactJS and jQuery, and frameworks such as Bootstrap or Foundation.

#### 2. Only supports GitHub repositories
Of course, GitHub only supports repositories from itself. If you use another platform like [Atlassian BitBucket](https://bitbucket.org/) for version control then you will not be able to utilise GitHub Pages. If you are using BitBucket, you are in luck since they too offer support for hosting static sites.  Check this [FAQ section](https://confluence.atlassian.com/bitbucket/publishing-a-website-on-bitbucket-cloud-221449776.html) for more information.

### Looking for Hosting?
- If you want the best Wordpress hosting, I highly recommend [Bluehost](https://www.bluehost.com/track/harishv/). Get a great discount when you [apply through this link](https://www.bluehost.com/track/harishv/).
- Also, get a massive discount with [Hostinger](https://www.hostg.xyz/aff_c?offer_id=6&aff_id=2883) when you [apply through this link](https://www.hostg.xyz/aff_c?offer_id=6&aff_id=2883).

Both services offer great uptime and customer service. Oh did I mention - you get a free domain name with both Bluehost and Hostinger!