Support Forums

How to change admin path?

How to change admin path? domain.com/admin to domain.com/abc

You can host the Netlify CMS’ JS file anywhere and that would become your admin path.

For example, if you want the path to be /abc/, simply add the CMS’ JS file to that path along with the index.html. That would do it.

Maybe I’m a little bit wrong about the meaning. I want to change the login directory. Because domain.com/admin is too predictable. By changing it, I will prevent any ideas from accessing

Yes, that’s what I meant. CMS will be available at the path you publish the JS files. So you could publish it at any path you want.

I saw the admin folder in /static but renaming the folder didn’t work

What was the error that you got?

I changed it but still access admin using domain.com/admin. Nothing changes

That’s not actually possible. Would you be able to share the repo?

gatsby-starter-foundation/static at main · obaviet/gatsby-starter-foundation (github.com)

I’ll check this in some time and revert.

You’re using this plugin:

Which automatically adds the path to admin.

You can change publicPath option for that plugin.

1 Like