Hosting a static website on Cloudflare
Web sites
cloudflare
hosting
web development
Hosting a static website on Cloudflare is great!
- It’s easy to set up.
- It’s easy to update.
- It’s free! 🥳
Cloudflare allows you to publish static websites for free. It only limits the number of “builds” per month, but even that is very generous and not a limit I am likely to exceed.
It connects with your git repository, so doing updates is extremely simple.
To get a local static website hosted on Cloudflare, this is the procedure:
- Set up your Git repository on GitHub.
- Set up a Cloudflare account.
- select Workers & Pages > Overview > Pages tab
- Click Connect to Git
- Select the repository and authorize
- Go through the deploy procedure. It’s easy, worked first time.
- To get it working with my domain name, I transferred my DNS management to Cloudflare. (Since this is a new domain without any other services, such as email, set up on it, I am being quite gung-ho about this type of thing. If it was an existing domain with existing email accounts associated with it, I would be much more cautious).