alt.hn

4/17/2026 at 10:53:18 PM

How to Host a Blog on a Subdirectory Instead of a Subdomain (2025)

https://www.davidma.org/blog/2025-11-14-host-your-blog-on-a-subdirectory/

by taikon

4/17/2026 at 11:03:19 PM

Maybe should add "with Cloudflare Workers" to the headline

Because hosting a blog inside a subdirectory is like the most trivial webserver thing ever

by teach

4/17/2026 at 11:51:40 PM

Are we not just doing static html for blogs anymore?

by ahme

4/18/2026 at 5:35:11 AM

We are, but throwing the static HTML on a global CDN (like CloudFlare Pages/Workers, Netlify, Firebase Hosting, etc) makes things easier (nothing to maintain) and ensures that if we end up popular on HN or Reddit, there is no hug of death because the scale is infinite. Also, all of those have very generous free tiers, so it can cost nothing.

by sofixa

4/18/2026 at 12:44:15 AM

That doesn’t sound bloated enough. Too fast. Gonna give a user whiplash.

by cr125rider

4/18/2026 at 1:25:20 AM

.htaccess that rewrites the .txt to serve the file as an .html extension. With help from bash you then append a bootstrap v3 CSS library to all files.

Using websockets for post updates this feeds in to a webview component powered by django that interacts with an Angular PHP parser using Wordpress as the database translation layer that a python daemon watches and dumps the wordpress entry back in to a text file.

You then render this in to a shadow DOM with react and include Vue.js and Next.js to create a carousel and landing page boilerplate.

by doublerabbit

4/18/2026 at 1:05:13 AM

We could just enable auto-index and drop a bunch of .txt files into it.

by Bender

4/17/2026 at 11:28:16 PM

I wanted to but it said it exceeds the character limit

by taikon

4/17/2026 at 11:33:26 PM

Maybe(?): How to Host a Blog in a directory Instead of Subdomain with Cloudflare Workers

by gnabgib

4/18/2026 at 1:40:30 AM

I was hoping this was a joke about storing your blog text AS the subdirectory name.

by nomel

4/18/2026 at 1:38:05 AM

also proof that everything old is new again at some point.

by shmoe

4/17/2026 at 11:01:01 PM

(2025) At the time (on a different domain, but not in a subdirectory) https://news.ycombinator.com/item?id=46050069

by gnabgib

4/17/2026 at 11:29:20 PM

Yes I switched the domain. But davidma.co redirects to davidma.org.

by taikon

4/17/2026 at 11:37:04 PM

It doesn't presently (maybe a config issue?) Cloudflare just never responds:

> Connecting to www.davidma.co(more..)

> HTTP request sent, awaiting response... (timeout)

by gnabgib

4/18/2026 at 3:16:53 AM

I'm not trying to be rude here, but this doesn't belong on this site. This is like posting documentation on CloudFlare for a tutorial that isn't remotely a feature.

by erdaniels

4/18/2026 at 5:12:37 AM

I use a subdomain because I like it, and my goals are not aligned with the assumed goals of the article.

by Computer0

4/17/2026 at 11:53:52 PM

This is somehow news? I was doing this 30 actual years ago.

Long before Google and Cloudflare stunk up the internet.

by theturtle