How do we stop traffic to our Ghost site if we are using Gatsby?

Did I miss something in the documentation? Let’s say I setup up a self-hosted ghost at ghost.example.com. And my gatsby site is at example.com. I can use the editor at ghost.example.com, pull to a local machine using the external api, make a gatsby site, then deploy. That all works fine (and generally works very well btw), but did I miss somewhere how do “shut off” the ghost.example.com. I don’t want people able to visit this site at all. Its only for the writers of the site to be able to make changes, then I can push those changes to the actual site at example.com.

Is this normal behavior? What do you other folks do to shut off ghost.example.com to the public?

You can enable Private Site mode in Ghost Admin under Settings>General to prevent public access to the front end of the site, whilst keeping the API available to be used by a headless front end. Apologies that this is not clearer in the docs :slight_smile:

1 Like

No worries, its very likely the case that I missed that! Thank you kindly for the reply.

We have a section written up here in our Gatsby docs on how you can use Private mode as well as using redirects to redirect any Ghost site page to your Gatsby counterpart:
https://ghost.org/docs/api/v3/gatsby/use-cases-pitfalls/#redirecting-to-external-urls

Hope this helps :blush:

1 Like