Static Webpage Hosting for Free (using GitHub Pages) on a custom domain

So my main project this year, StartupPilots, will require a lot of splash pages and I was trying to work out the best way to host these for as cheap as possible. After looking around I was really happy to find GitHub Pages, which as long as you’re ok with a static page, is perfect. So here is a quick rundown of how to get started and get your domain up and running in no time at all:

  1. If you haven’t already create an account on GitHub.com
  2. Create a new organisation (Click the +, select Organisation)
  3. Write a name for your organisation, select ‘Open Source’ (if you’re hosting a static page then people can grab this pretty easily anyway so no worries)
  4. Now create a repository in this new organisation, and make sure it is called youorganisation.github.io (very important).
  5. Now we need to upload your content to this repository, so follow the guide to uploading. Make sure you have an index.html file at the base level.
  6. Once you have pushed your files to your repository you’ll notice you can now access the index.html by going to: youorganisation.github.io in your browser.
  7. Now we need to setup your domain name, so buy your domain name as you normally would (GoDaddy.com, Google.com/domains), and go into the DNS settings
  8. Create an Alias (A) Record with the IP Address’ of: 192.30.252.154 & 192.30.252.153.
  9. Create a CNAME Record with www and youorganisation.github.io as the domain name
  10. Finally we need to set it up inside of your GitHub Page, so go back into your local repository, create a new file called ‘CNAME’ and just have one line with ‘yourdomain.com’ (No www, http…etc).
  11. Push this to your repository again
  12. Wait up to 10 minutes and then refresh and you should see whatever you had in your index.html

I’m currently using it for 3 StartupPilots websites:

http://www.affiliatelink.me/

http://www.signbold.com/

http://www.decibelrecorder.com/

So enjoy! And hopefully by my next blog post StartupPilots.com will be live so make sure to check it out!