Larry the cat lying next to a wireless keyboard

Why Cloudflare Worker logs only show some routes


I kept opening Cloudflare observability and wondering why only /contact produced INFO logs. The rest of the site looked silent, like nothing was running.

Nothing was broken. Most pages never hit the Worker.

Static first, Worker when needed

This site is built with Astro 6 and deployed to Cloudflare Workers. At build time, Astro pre-renders most routes into dist/client/—HTML for /, /about, /blog, each post, /resume, /rss.xml, plus hashed assets under /_astro/. Files from public/ (including /apod/today.json and /apod/background.webp) land there too.

Cloudflare serves that tree through the ASSETS binding. Those requests do not run your Worker script, so you will not see invocation logs for them.

Pages and handlers marked export const prerender = false are not shipped as HTML in dist/client/. On this site that is only:

  • /contact (Turnstile widget and server-side env checks)
  • POST /api/contact (validation, Turnstile siteverify, Resend)

The home page loads /apod/today.json in the browser as a static asset. That fetch does not invoke your Worker, which is why you will not see APOD traffic in Worker observability.

Older Astro + Cloudflare guides often pointed at a generated dist/_routes.json exclude list. On Astro 6 with @astrojs/cloudflare v13, the mental model is the same—static bytes skip the Worker—but you usually reason from dist/client/ and prerender flags instead of opening _routes.json after every build.

How to read this when debugging

SymptomLikely meaning
No logs for /blog/...Expected: static HTML
No logs for /apod/today.jsonExpected: static file under /apod/*
Logs for /contactWorker SSR is running
Logs for POST /api/contactAPI route on the Worker

If you add a new dynamic route, expect logs. If you prerender a page—or serve it from public/—expect silence in Worker observability, and that is usually what you want.

For debugging Worker routes that do run, see Fix Astro API route 404 on Cloudflare Workers. The site architecture overview is in Rebuilding mayfield.io.


Hero photo: Larry the cat laying by a Logitech K400 keyboard by Trougnouf, CC BY 4.0.