Free hosting on GitHub with GitHub Pages!
There are loads of benefits of having your website on the internet. Be it for showcasing your talent to a potential client, position yourself as an expert in your field, or maybe just to share your thoughts on anything over the internet.
In this article, I will tell you how you can make free hosting for yourself. You would also get a domain name for free, although I would recommend having a custom domain name if you want to use it for commercial purposes. Let's begin!
Introduction, what is GitHub and GitHub pages
1:) What is Github:
GitHub is a code-sharing platform based on Git. It enables devs from all across the globe to share, review and make changes to the code-base. I wrote an article about how to get started with Git and GitHub. If you want to move further in this article then I would recommend first reading this article in case you don’t know how to use Git and GitHub.
2:) What is GitHub Pages:
It is a free service of GitHub that enables the devs to show the Working website with all its frontend features. GitHub provides server space and a domain name for free. You can also use your custom domain name if you like that.
How can you use it :
Click on the settings tab, and scroll to the bottom of the page. This screen will appear:
Click on the pages icon and choose the branch which has your HTML file. Remember that your main HTML file should not be in any folder and should be directly inside the branch.
Choose the branch and choose root in the other dropdown. The page should look like this:
Click on the link and enjoy your website which you must have tirelessly worked on. Now, you can show your website to anyone with this link and from now on, any changes you would do to this repo would instantly be reflected on this site.
This was the way you can host your site for free on GitHub pages. Remember that it can only hold frontend sites and not the ones which require a backend. For that, you have to rent a server.