Guide shows how to move a blog from a subdomain into a subdirectory — and why you might care

The pitch: SEO and consolidated authority
A step‑by‑step guide published on davidma.org — and shared on Hacker News — walks through hosting a blog at example.com/blog instead of blog.example.com. The argument is simple: consolidate ranking power, please search engines, gain traffic. It has been reported that empirical data suggests subdirectories often outperform subdomains for organic search, and ButterCMS has even argued one approach can be “40% better.” The guide’s author also says they saw a noticeable traffic lift after moving a blog; it has been reported that the increase appeared within weeks without additional content or promotion.
The method: Cloudflare, CNAMEs, Vercel and Render
This isn’t a theory piece — the post is a practical walkthrough. It uses Cloudflare as the control plane: set DNS records for the main site, add proxied CNAMEs for the blog and any APIs, and route traffic so the blog (example: a Next.js app on Vercel) serves from example.com/blog while the primary site stays on Render. The author emphasizes key details — don’t add wildcard records, set proxy status to “Proxied,” and be ready for Cloudflare’s dashboard UI to change on you. Simple in concept; fiddly in practice.
Trade‑offs: worth the time?
Here’s the rub: setting this up can be fiddly and time‑consuming, especially if your CMS expects a subdomain. The guide admits the migration is harder than it sounds and might not be worth it for every site owner. So ask yourself: do you want the potential SEO upside enough to wrestle with DNS, redirects, and hosting quirks? If you like control and hate split authority, this is for you; if you’d rather avoid hair‑pulling, maybe not.
Bottom line
The guide is a hands‑on resource for anyone willing to do the work and manage Cloudflare’s quirks. Want to try it yourself? The full step‑by‑step is available on davidma.org, complete with the exact DNS records and caveats the author used.
Sources: davidma.org, Hacker News
Comments