How to host a website within a minute for FREE!

How to host a website within a minute for FREE!

Pradumna Saraf
ยทFeb 15, 2022ยท

2 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

Table of contents

Yes!! you heard it right, with the help of GitHub Pages you can host a website within a minute, for FREE.

So what are GitHub Pages?

Image description

GitHub Pages is a static website hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub optionally runs the files through a build process and publishes a website.

Image description

Let's now get straight into the process.

Image description

Step-1 : Creating a GitHub account,

If you already have, you can skip this step.

Image description

Step-2 : Creating a GitHub Repo.

Create a new public repository and named it as <Your-username>.github.io,(as shown in the image below). If it's an organization account, then put the organization name. After that commit it.

Image description

Step-3 : Adding a index.html file.

After the repo is created, now it's time to add the index file. You will get served with this kind of screen after you committed the repo, click on creating a new file. Also, you can head over to the repo main page for creating the file.

Image description

Name the file index.html(shown in the image below) and add some starter HTML code (You can use the sample code below).

Image description

<!DOCTYPE html>
<html>
    <head>
         <title>Pradumna Saraf</title>
    </head>
    <body>

         <h1>Website in One Minute</h1>
         <p>We Did it :)</p>

    </body>
</html>

After adding the starter code, scroll down and commit those changes.

WOOHOO ๐ŸŽ‰, It's done, your website is hosted at .github.io, in my case pradumnasaraf.github.io


Note: if your website is not visible, no need to worry, wait 1-2 minutes and then try again because sometimes deployment takes time:D.

Did you find this article valuable?

Support Pradumna Saraf by becoming a sponsor. Any amount is appreciated!

See recent sponsors |ย Learn more about Hashnode Sponsors
ย 
Share this