Changing Admin URL in Ghost CMS

Hello Ghost CMS community,

I would like to change the default admin URL from example.com/ghost to either example.com/admin or set up a subdomain like admin.example.com. Simultaneously, I want to restrict access to the admin interface through the original URL (example.com/ghost).

I have reviewed the official Ghost documentation, but I couldn’t find specific information on this customization. Could someone kindly provide steps or point me in the right direction to achieve this?

Welcome to the Ghost community, @barryx.

Use this function in config.production.json to specify a different hostname. It won’t affect the path that the admin panel is served as this is always /ghost/.

"admin": {
  "url": "https://admin.example.com"
}

If you really have to have the admin portal at /admin, I think you’re looking at either hacking the Ghost core or else doing some URL rewriting using Cloudflare or another reverse proxy. It certainly could be done, but I’d start by asking why it has to be /admin/ and not /ghost.

You should also be aware that because Ghost’s APIs run from the admin URL it will always be publicly known because many of Ghosts functions (search, memberships, etc) work by using the API. That will also cause problems if you restrict access to it entirely.

As @Cathy_Sarisky said, if you can share why you want to change urls it will help others advise based on your use-cases