Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Change admin url

default discord avatar
generator1012 years ago
6

Is it possible to change the admin url?


Default right now is

/admin

, what if I want to change it to

/login

or

/custom-admin-login

?

  • default discord avatar
    bombnp2 years ago

    check the

    routes

    key in payload config.

    https://payloadcms.com/docs/configuration/overview
  • default discord avatar
    generator1012 years ago

    great, thanks, I missed that in the doc



    routes: {
       admin: '/custom-admin-login',
    },


    here is what I added in

    payload.config.ts

    in case someone else comes across this question

  • default discord avatar
    arskeliss2 years ago

    Thanks mate, this helps me as well. Cheers

  • default discord avatar
    gregwhitworthlast year
    @944284724824801302

    this is all well and good to create a new landing page; but I'm fine with the current login but want to change /admin once logged in to be

    settings

    . So when you changed yours to

    /custom-admin-login

    what does navigation upon login look like? Take the following example:



    http://localhost:3000/admin/collections/media?limit=10

    With your change does it then look like this:



    http://localhost:3000/custom-admin-login/collections/media?limit=10

    cc:

    @275258786388639744

    just in case you know

  • default discord avatar
    bombnplast year

    yes. If you change admin route to /custom-admin-login, then any url that would originally be /admin/* becomes /custom-admin-login/*

  • default discord avatar
    jackaltd5 months ago

    I tried this, but the old /admin is still working (ot forwarding me to the changed path) , which is bad.


    Other than that, I cant login...


    404 notfound error

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.