How to set up a GitHub page?

If you want to create your site on GitHub with your custom HTML code, then you can do it easily with GitHub page functionality. Let’s discuss how to set up a GitHub page.

The GitHub page will host your site with URL. That will be super fast as it is hosted on GitHub and also comes with SSL. It will get the code directly from your repository. So you don’t need to do any further process. Just push your code on the repo and boom. Your changes will be there on the site in a few minutes.

You must have a GitHub account for that.

Create a GitHub repo

Create a public repo with the name where the username will be your actual username on GitHub.

How to set up a GitHub page?
Create a repo for the GitHub page.

Add HTML code

Push some of your HTML code to the repo. Below is a simple example but you can add your whole code.

How to set up a GitHub page?
HTML Code.

Visit the browser with [username] URL

And now you’re done. Go to your browser and hit the URL

How to set up a GitHub page?
Page setup on

You’ve successfully launched your GitHub Page.

This is just an example of the GitHub URL. If you see my URL is not working in the future, either we would have removed it or removed the page itself. But you can continue with your own URL.

If you still face some issues, your URL is not working or anything else. Go to that repository Settings > Pages. You will find all settings there. Try to select a branch in the Branch setting.

How to set up a GitHub page?
GitHub page setting.

You can also set up your custom domain. And your GitHub hosted site will run on that domain. Click here to read how you can configure your custom domain with GitHub Page.

Must Read:

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *