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.
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.
- Create an account on GitHub
- Click the top right plus sign to create a new repository
- 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
- 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.
- Now go back to GitHub and click Set up in Desktop. Your repository will open in the desktop software you just installed.
- 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.
- 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.
- 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.
- 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.ioyou will see your website is instantly live. Here is the one we just set up grindtime.github.io
- 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.
- Now go back to your GitHub software. Make sure you’re at the changes tab, add a comment and hit commit to master.
- 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.
- 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:
184.108.40.206(those are the IPs for GitHub pages found here).
- CNAME record for the
wwwsubdomain pointing to your GitHub page.Your DNS should match the image below, with your own github.io CNAME of course.
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.