In this article we’ll show you how you can easily host a basic website on your GitHub account using GitHub Pages. This can be valuable if you require an offsite resource to redirect visitors to in case of emergency hosting situations. For example, if you are undergoing maintenance or switching servers, you will be able to offload resources temporarily.
Setting up a Site with GitHub Pages
GitHub pages supports static HTML files. This means you can host an uncomplicated site there. There are no databases, so you can't install something like a WordPress site. You will also have no options for SSL if you choose to use a <a href="/support/domain-names/how-to-use-a-custom-domain-with-github-pages/">custom domain</a>. But, for a very basic project or emergency page, this is an easy way to set up a site quickly.
- Log into your GitHub Account
- Select New repository at the top right
- Name the repository
- Click Create Repository
- Visit your repository and choose Settings
- Select Choose a theme under the GitHub Pages section
- Select your theme
- Add content to the page or edit the existing content in the form window
- Click the green Commit Changes button to add changes to the master branch
- Visitor your new site at https://username.github.io/name-of-repository/ (a link will be provided to you)
Next Steps
Now that you have created a single page hosted at GitHub.com, we will show you how to use a <a href="/support/domain-names/how-to-use-a-custom-domain-with-github-pages/">custom domain</a>.