Deploying Static Website using Cloudflare Workers
Kranti saini
September 14, 2025
Cloudflare offers generous limits with their free offering. One of the products included is Cloudflare workers. You can host serverless projects without having to worry about how and where to host them.
Cloudflare has another product Cloudflare Pages which can be used for hosting static sites. It seems like active development on Pages has stopped, and Clouflare recommends using Workers instead. Docs for hosting static assets are here. But it's not immediately clear from the docs how you wouldd host a simple static website generated using 11ty.dev.
Turns out, it's quite simple:
This is how this website's wrangler config looks like:
{
"name": "til-kranti-me",
"assets": { "directory": "public" },
"compatibility_date":"2025-09-14",
"routes": [
{ "pattern": "til.kranti.me", "custom_domain": true }
]
}All for at-cost domain I bought (rent?) from Cloudflare. Thanks Cloudflare!
Discussion in the ATmosphere