How to get lifetime free hosting

Not many SEO’s know about this, but there is actually a way to get free hosting on a blazing speed host, namely GitHub.It serves static content on their global CDN, so the response times are instant.

Note: The only drawback is that you can’t host your WordPress blog on there, only static sites. If you are in need of fast hosting for your WP site I can highly recommend using Serverpilot with Digitalocean, it’s extremely easy to set up with these instructions.

Back to free hosting now, this process is relatively advanced the first time you do it, but I’ll guide you through it step by step.

  1. Create an account on GitHub
  2. Click the top right plus sign to create a new repositorynewrepo
  3. IMPORTANT! For your repository to get recognized as a GitHub page, you need to make sure your repository name is username.github.io. In my case, this is grindtime.github.io.create
  4. Download GitHub for desktop (available both for Mac and Windows). When installed, you just log into your previously created GitHub account. At the configuration step, you can enter whatever name and email you like, it’s just for configuring your local git user. At the final step, just continue to the dashboard.config
  5. Now go back to GitHub and click Set up in Desktop. Your repository will open in the desktop software you just installed.setup
  6. Here you can just choose which folder you want the repository to be initialized in. When you have selected your folder, go ahead and click open this repository in explorer from the software dashboard.init
  7. Copy your complete website to this folder. This folder will automatically sync with the software. When you see all your files in the file tree, go ahead and type in any comment in the Summary input and hit Commit to master.summary
  8. You have now committed these changes to your local repository, time to push our changes to the GitHub repository. Just hit publish at the top right corner.publish
  9. If you go back to your Github account and refresh the page, you will see your files have been uploaded. Now if you open http://username.github.io you will see your website is instantly live. Here is the one we just set up grindtime.github.ioresult
  10. The next step is to point your domain to your new Github hosting. To do this, you need to create a file called CNAME and put it in your local folder where you uploaded your whole website.
    The file should not have any file extension or it won’t work. In this file just enter your domain.com and save it.
    If you don’t know how to create a file without an extension, feel free to download my file. Remember not to save it as a text file. Then just open it up in any text editor and replace my domain with your domain.
  11. Now go back to your GitHub software. Make sure you’re at the changes tab, add a comment and hit commit to master.cname
  12. Don’t forget to hit Sync at the top right corner now. Then go to your GitHub repository in the browser and make sure the CNAME file has been added.sync
  13. The final step is to change the DNS at your registrar.

You need to add the following records:

  • Two A records with the following IPs: 192.30.252.153 & 192.30.252.154 (those are the IPs for GitHub pages found here).
  • CNAME record for the www subdomain pointing to your GitHub page.Your DNS should match the image below, with your own github.io CNAME of course.

dns

And that’s all. Normally takes a few hours for the DNS to update so don’t worry if you don’t see the changes instantly.

If you get stuck, feel free to leave a comment and I’ll help you as soon as I got time.

 

About the author

Daniel Nikolovski

Daniel Nikolovski

I am a front end developer, UX designer and have been doing SEO professionally for the last 5 years. I still learn new creative ways every day and that is the main reason I am writing about it.

Follow Daniel: Facebook | Twitter | LinkedIn

Comments

comments