Both are free and both can put a portfolio online today. They’re built for different kinds of site, though, and picking the wrong one means rebuilding later.
The one-line difference
GitHub Pages serves static files from a Git repository. Free web hosting runs server-side code like PHP with a MySQL database.
Side by side
| GitHub Pages | Free web hosting | |
|---|---|---|
| Plain HTML, CSS, JS | Yes | Yes |
| Static site generators | Yes (built for it) | Yes (upload the output) |
| PHP and MySQL | No | Yes |
| WordPress | No | Yes, one-click |
| Custom domain + HTTPS | Yes | Yes |
| Deploy by | git push |
File manager or FTP |
| Contact forms, logins | Needs a third-party service | Built in with PHP |
Choose GitHub Pages when…
- Your site is static: a portfolio, documentation, or a site built with a generator.
- You already use Git and want deploys to be a
git push. - You want your code and your site in the same place for recruiters to see.
Choose free web hosting when…
- You need PHP, a database, or WordPress.
- You want a form that sends you messages, a login, or a small CMS.
- You’d rather upload files than learn Git today.
Custom domains on either
Both support your own domain with HTTPS. On GitHub Pages you add a CNAME file and set DNS records at your registrar. On free web hosting you point the domain at the server, and the certificate is issued for you.
If you don’t have a domain yet, the first year is free with an annual hosting plan, or you can start on the free subdomain.
How we made this: drafted with AI assistance, then edited. Technical testing is pending.