3
3 Comments

How to put your Ghost blog at a subdirectory for $5/m

After some pretty painful days, I managed to put Cloakist's new Ghost blog at the subdirectory https://cloak.ist/blog instead of having to put it at a subdomain like blog.cloak.ist.

(Thanks to this post from @Mathias458 for giving me a headstart.)

I wanted to do this because:

  • From what I read it's muuuuch better for SEO to build up value in my root domain.
  • Ghost is a really great tool for blogging and will keep me writing more than a less user-friendly tool.

I find it really weird that there's no easy way to do this, given what seems like a very clear problem. (Someone build it?)

Anyway -- key steps are:

  • Create a Ghost $5/m droplet with DigitalOcean
  • Put it at a subdomain to start off with
  • Change the Ghost blog URL to subdomain.rootdomain.com/blog
  • Set up a Cloudflare worker to show the subdomain content at rootdomain.com/blog, and change all URLs from subdomain to root domain
  • Use Cloudflare Firewall to restrict the subdomain to everyone apart from yourself and Cloudflare

For more details, including a far more detailed step-by-step guide and the exact commands and code to use, see my post here:

https://cloak.ist/blog/how-to-put-a-ghost-blog-at-a-subdirectory-using-cloudflare-workers/

  1. 1

    Oh, very cool!

    Any way you can do this on a hosted plan?

    1. 1

      You mean hosted by Ghost? Hmm, I am not sure. I believe in theory it should be possible. You could just try following the guide I wrote for the Cloudflare Workers part and making some adaptations.

      Does the hosted plan allow you to change blog URL from subdomain.yoursite.com to subdomain.yoursite.com/blog? If not, you'd need to adjust my Cloudflare Worker script so that:

      These are relatively easy tweaks (I could give tips if you can't work it out). There might however be something else I'm missing about why doing this on a hosted plan will be difficult. I feel like there's a reason why this article says it's difficult.

      1. 1

        Thanks! I should probably just use the API and send posts to my new django site actually so the look stays consistent.

Trending on Indie Hackers
Passed $7k 💵 in a month with my boring directory of job boards 56 comments How I got 1,000+ sign-ups in less than a month with social media alone 20 comments 87.7% of entrepreneurs struggle with at least one mental health issue 14 comments How to Secure #1 on Product Hunt: DO’s and DON'Ts / Experience from PitchBob – AI Pitch Deck Generator & Founders Co-Pilot 13 comments Competing with a substitute? 📌 Here are 4 ad examples you can use [from TOP to BOTTOM of funnel] 10 comments Are you wondering how to gain subscribers to a founder's X account from scratch? 9 comments