Features
Hosting /blog with Cloudflare
July 25, 2025
This feature is available in the Startup plan ($39/mo plan).
This feature is only enabled for blog and docs websites for the following subdirectories
/blog
Enable subdirectory host in dashboard /blog
Enable the proxy option in Cloudflare DNS (the orange icon)
To host on a subdirectory you will need to create a Cloudflare worker to rewrite traffic from a subdirectory to BlogPro websites. To do this you need to have the orange icon (the proxy option) enabled for your domain.
Copy the code to paste in Cloudflare workers
Adjust BLOGPRO_SUBDOMAIN with your subdomain name in blogpro dashboard.
Create the Cloudflare worker
- Go to cloudflare.com and log in
- Go to the Compute (Workers) tab
- Click create service and choose Start with Hello World! template.
- Name your service with something like
BlogPro {websiteName}and create it
- Click the
Edit Codebutton and paste the BlogPro code
Create worker routes
- Add route on worker routes at selected domain.
- Fill the route with your domain with blog as subdirectory like below, don’t forget to add asterisk at the end of the string (*). (yourdomain.com/blog*)
- Then choose the worker created before
- Save and try out your new website in a subdirectory!
FAQ
How much time does it take for the changes to take effect?
If you already had the orange icon already enabled the changes should be instantaneous. If instead you had to enable the orange icon it could take hours for DNS changes to take effect.
Can i host any website in a subdirectory this way?
No, only some services like Blogpro allow this use case. The websites need to be built specifically for being hosted in a subdirectory (Blogpro handle only the /blog paths for example)
Do i need Cloudflare or does this work with any other DNS provider?
You need Cloudflare, this method relies on the Workers feature that is available only in Cloudflare
Why is the orange icon (proxy option) required?
Because Cloudflare workers work only on domains with that option enabled. Without that option Cloudflare cannot intercept http traffic