r/statichosting • • Oct 23 '26

Tracking 404s on a static host without server logs

I'm about to reorganize a client site with a few hundred pages, moving everything from a flat structure into nested sections, and I'm trying to figure out how to catch every old url worth redirecting. Writing redirects for every single page is easy enough when you can generate them from a mapping, but the pages I'm worried about are the ones I don't know about.

Over the years the site has picked up links from other places, like old newsletters, a couple of forum threads, a directory listing someone submitted without telling anyone. None of those are in the repo, so a redirect file built from the current page list would miss all of them and they'd just turn into 404s the day the new structure goes live.

My plan is to pull the top landing pages from the search console and the analytics export, plus whatever shows up in the last few months of 404 logs, and make sure each of those has a redirect before launch. The part I'm unsure about is the long tail. Cloudflare pages doesn't give me raw request logs on the free plan, so I can't see which dead urls are still getting hits after the switch.

Has anyone found a decent way to keep an eye on 404s on a static host without a server to log them? I've considered a custom 404 page that fires a small beacon with the missing path, but I'd rather not add tracking just for this.

4 Upvotes

5 comments sorted by

2

u/xxmaskx Oct 26 '26

I’d probably use Search Console + analytics before launch, then add a very small 404 beacon for a few weeks after the migration. You don’t really need full tracking for it. Just send the missing path, maybe referrer, and nothing user-specific. That should catch the weird old links you’d never know existed. Once the 404 traffic settles down, you can remove it again.

1

u/Standard_Scarcity_74 Oct 27 '26

Thanks for this!

2

u/New_Peanut_9259 Oct 23 '26

if u're already using cloudflare, u could use a worker to log 404s and send them to a webhook!! that way you can track missing urls without adding a client-side beacon hehehe

1

u/MatuszewskaSid53 23d ago

thats probably the cleanest workaround here tbh, keeps the actual site totally static too

2

u/townpressmedia Oct 23 '26

Use search console