Having a personal or business website is crucial for building your online presence in the modern digital world. However, website hosting can occasionally be expensive, particularly for newcomers or those with limited resources. Thankfully, everyone has access to GitHub’s straightforward and cost-free static website hosting solution. We’ll walk you through the process of using GitHub to host your website for free in this article.
Step 1: Create a github account
Go to GitHub.com and create an account if you don’t already have one. It’s free, quick, and simple. After creating your account, sign in to begin using it.
step 2: Create a new repository
After logging in, pick “New repository (The green button)” from the dropdown menu by clicking the “+” button in the top right corner of the screen. Give your repository a name: “username.github.io” for example, where “username” is your username on GitHub. This naming scheme is crucial because it will be your website’s URL.
Step 3: Upload your website files
You must upload the files for your website to the repository once it has been created. Upload your HTML, CSS, and JavaScript files, along with any additional assets (fonts, photos, etc.), if you already have a website. You can use any text editor or website builder of your choosing to construct a website if you don’t already have one.
For this example, I used the repository from one of my old projects.
Step 4: Enable github pages
Go to your repository’s “Settings” tab. Choose the branch (usually “main” or “master”) that you want to utilize for your website by scrolling down to the “GitHub Pages” section. Next, press the “Save” button. Your website will now be published on https://username.github.io via GitHub Pages, where “username” is your GitHub login.
Go to Pages
Visit your now hosted website
Your website is now hosted on GitHub
Conclusion
Using GitHub to host your website for free is a great way for individuals and small businesses to go online without spending a fortune. With only a few easy steps and a worldwide audience to reach, you can launch your website quickly and easily without having to worry about costly hosting costs. Why then wait? Start now to explore the web with all of your creative potential!