Put your site's files in a GitHub repository with an index.html, index.md or README.md entry file, then set a publishing source for GitHub Pages in that repository. With GitHub Free the repository must be public, and you can't use Pages to host an online business or shop.
What GitHub Pages can host, and on which plan
GitHub Pages is a static hosting service: it takes HTML, CSS and JavaScript files from a repository and publishes them as a website. It doesn't support server-side languages such as PHP, Ruby or Python.
Your plan decides which repositories you can publish from. GitHub's free plan gives you Pages in public repositories only, and the same goes for GitHub Free for organizations. On GitHub Pro, Team, Enterprise Cloud or Enterprise Server, you can publish from private repositories too.
A private repository doesn't make a private website, though. The published site is still publicly available on the internet, so take out any sensitive data first.
Two kinds of site, two web addresses
The repository's name matters, so I'd pick the type of site before creating it. A user or organisation site lives at <owner>.github.io, and you're limited to one per account. A project site lives at <owner>.github.io/<repositoryname>, and you can have one for each repository. You aren't tied to the github.io domain either: Pages also works with your own custom domain.
Create the repository on GitHub.com
Any files you publish need a repository to sit in, which is also the starting point for using GitHub to host a site.
- In the upper-right corner of any page, open the menu and click New repository.
- Choose the Owner.
- Type a name. For a user or organisation site it must be <user>.github.io or <organization>.github.io, all in lowercase.
- Choose a visibility. Pick public if you're on GitHub Free.
- Toggle Add README to On.
- Click Create repository.
Add your entry file and publish
- Go to your site's repository on GitHub.com.
- Decide on a publishing source: either a branch and folder, or a GitHub Actions workflow.
- Create the entry file, named index.html, index.md or README.md. With a branch and folder as your source, it has to be at the top level of that folder. So if you're publishing from /docs on main, the file goes in /docs.
- Configure the publishing source for the repository.
The two sources differ in how they build. Branch publishing runs your files through Jekyll by default; if you don't want that, put an empty file named .nojekyll in the root of the publishing source. With GitHub Actions, standard runners are free for public repositories. In a private repository, usage charges apply once you've used up what your plan includes.
Find the live link in Settings
- Under the repository name, click Settings. If it isn't visible, use the dropdown menu.
- In the sidebar's Code, planning, and automation section, click Pages.
- Under GitHub Pages, click Visit site.
Mistakes that stop a site showing, or break the rules
Checking too soon
Changes can take up to 10 minutes to publish, so don't start undoing things straight away. If they haven't shown after an hour, check for Jekyll build errors. A deployment that runs past 10 minutes times out.
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
Pushing from an account that can't trigger publishing
If you're publishing from a branch and the site hasn't appeared, check who's pushed to the publishing source. It has to be someone with admin permissions and a verified email address.
Running a shop or online business on it
According to GitHub's documentation, Pages isn't intended for, or allowed as, free hosting to run an online business or an e-commerce site. The same rule covers any site that's primarily directed at commercial transactions or commercial software as a service. You also shouldn't use a Pages site for sensitive transactions, such as sending passwords or credit card numbers.
Ignoring the size and traffic limits
A published site can't be larger than 1 GB, and that's also the recommended limit for the source repository. There's a soft limit of 100 GB of bandwidth a month, plus one of 10 builds an hour, which doesn't apply if you build with a custom GitHub Actions workflow.
Go over the quotas and GitHub may not serve your site, or it may email you suggestions such as a content distribution network, releases or a different host. If requests are being rate limited, they'll get an HTTP 429 status.
Forgetting that visitors are logged
When someone visits a Pages site, their IP address is logged and stored for security purposes. That's true whether or not they're signed in to GitHub.
My advice for a small business
Choose GitHub Pages for a static site that isn't there to sell, and keep the repository public so you can stay on GitHub Free. Your shop, checkout or paid software should go on a different host from day one.


