Cloudflare in front of everything

4 min read

All our sites go through Cloudflare, and our servers take web traffic from nobody else. How we use it, the cache rule that got us into trouble, and why one domain moved to the Pro plan.

We manage over 60 domains on Cloudflare, the service that sits between visitors and servers. It routes traffic, filters suspicious requests and caches files that do not change, keeping a copy close to the visitor.

Cloudflare traffic only

Our servers only accept web traffic from Cloudflare's addresses. Anyone trying to reach a site by going straight to the server's IP finds the door shut, so every request passes through the filter first.

With php2shell this really paid off. When those PHP flaws came out, Cloudflare switched on WAF rules, its web application firewall, against the known attacks. On our sites those rules covered all traffic during the hours when the PHP update for our servers was not yet available.

The cache rule that got us into trouble

On 20 October 2026, on a sailing regatta site, we found a "cache everything" rule written for the old site. With the new site, built on Laravel and Inertia, it was causing damage.

Inertia is the piece that makes a Laravel app behave like a modern application. The same address returns the HTML page when you arrive from the browser, and raw JSON data when you move around inside the app.

To tell the two apart, the server sends a Vary: X-Inertia header, which tells caches to keep two separate copies. Cloudflare, however, ignores Vary: X-Inertia and was keeping just one.

The upshot: sometimes visitors got raw data instead of the page, a screen of unreadable text. Other times they got an old version of the page.

The rule we now apply everywhere

That way the heavy files are served by Cloudflare, close to the visitor, and pages always arrive fresh from the server.

We also took away a working habit: when a site is rebuilt, the old site's cache rules get reviewed before go-live. Otherwise they sit there quietly until someone notices from the wrong side.

One domain on the Pro plan

We also moved one domain to Cloudflare's Pro plan to test speed from Italy. The difference is in the route: on the Pro plan, Italian visits go through the Rome node instead of Zurich.

A closer node means a shorter trip for every request. How much that matters in practice depends on the site and where its audience is, so we judge it case by case.

What we recommend

field notes

Fresh from the workshop.

the next story

What's the next story?

Tell us what isn't working. The first meeting is to see whether it's worth doing anything, and if the answer is no, we'll tell you straight away.

Office
Via Vincenzo Arangio Ruiz 83, 80122 Napoli
The message that will be sent Pick something above…
Open WhatsApp with the message ready

Or call us: 351 240 7196 · [email protected]