Robots.txt override in private mode

I just wanted to bring this topic up again which was discussed here.

I am using ghost as a headless cms for blog posts and would like to keep the published site password protected. The only reason I need to override the robots.txt file is Twitter (X) and specifically twitter embed cards, which respect the private request by ghost’s robots.txt and does not display hosted images on their cards.

The suggested solution in the thread was:

In most cases the best approach is to either use an external storage adapter, or download all images locally as a part of your front-end build process so the assets are served statically with the rest of the site.

This is a bit of an overkill for what could just be a setting in ghost for setting a custom robots.txt file.

It would be extremely useful if under settings where you make your site private, you’d have a text input for custom robots.txt rules. Twitter (X) is a pretty major marketing channel for publishing and blogs, and I think that alone justifies the need for the solution to come from Ghost.

Thanks a lot!


Made a quick mockup of what it could look like