Ki-Ki Websites and web tools

Cloudflare Workers

A Worker is a small script that runs on Cloudflare before a request reaches your website. I use them to add features to static sites without moving to a full web application.

Workers run on Cloudflare's network, close to the visitor, and can be attached to particular addresses on your site. Your hosting only receives the requests the Worker passes on.

What I use Workers for

Redirects and routing

Sending old addresses to new pages, splitting one domain across different services, or serving a maintenance page while work is done.

Security headers

Adding headers that tell browsers how to handle your pages, such as a content security policy, without changing each page.

Forms and small features

Handling a contact form, checking a submission for spam or returning a small piece of data, so a static site can do a little more than show pages.

Request filtering and logs

Extra checks on busy or sensitive addresses alongside your firewall rules, and a dated record of blocked or challenged requests when you need to explain an incident.

When a Worker is worth it

Most small sites don't need one. A static site behind Cloudflare with sensible firewall rules covers the basics. I suggest a Worker when there's a specific job it does more simply than a plugin, an extra service or a move to a heavier platform.

Every Worker I set up comes with notes on what it does, which addresses it runs on and how to switch it off.

Questions

What is a Cloudflare Worker?

A small script that runs on Cloudflare's servers when a request arrives for your site. It can redirect the request, change headers, run a check or pass it on to your hosting.

Does my site need one?

Usually not. Simple websites work well behind Cloudflare without one. I'll tell you if a Worker would solve a problem you actually have.

What does it cost to run?

Cloudflare includes a free allowance of Worker requests that covers most small sites. I'll check your traffic against it before setting one up.