Changing the Strapi admin panel URL, host and port

Teams change the Strapi admin panel URL when editors need a different path, a separate host or a non-default port behind their own routing. This page explains the settings involved, the build and proxy changes that follow and what to confirm before go-live.

On this page

Why teams move the Strapi admin panel URL off /admin

Teams move the Strapi admin panel off its default /admin path or onto a different host or port when editors need a separate entry point, when a shared API gateway or reverse proxy already owns the root domain, or when security reviewers want the admin isolated from public traffic. The short answer is that the change is possible, but it is never a single setting. The admin is a built front end that the Strapi server serves, so a URL change touches three layers together: server configuration, the admin build, and the routing in front of the server. Treat it as one change with one owner, not three small tweaks.

Before anyone edits a file, the team should confirm the exact configuration keys for the Strapi version in use. Key names for the admin path, the public URL and the server host and port have changed across major releases, and this page does not assume any of them are settled. Check the current server and admin configuration reference in the Strapi documentation for your version, and record the keys in your change ticket. Also confirm the admin build behavior, because an admin compiled for one base path will load assets from the wrong location if the path changes without a rebuild. Ask whoever owns the gateway which paths it forwards and whether it rewrites them.

Which admin path, host and port option fits your setup

This table compares four ways to expose the Strapi admin panel: keeping the default path, moving it to a custom path, serving it from a separate host, and changing only the port behind a reverse proxy. Each row shows which settings change, what the proxy and CORS work involves, and when the option fits. Confirm exact key names in the Strapi configuration docs before you edit files.

OptionServer and admin configurationProxy routing and CORSWhen it fits
Keep /admin on the same hostNo change to the admin path. The server listens on the default port and the admin build uses the default base path.Proxy forwards all traffic to the Strapi process. CORS covers only the front-end origins that call the content API.Single-team setups, internal tools, or when the admin is already behind a private network boundary.
Custom path on the same hostSet the admin path in the server configuration and rebuild the admin, since the path is baked into the build. Confirm the key name in the docs.Proxy must route the custom path to Strapi and pass the path unchanged. Check that the admin's API calls resolve under the new path.When a URL convention, a shared domain, or a gateway rule requires a non-default admin location.
Admin on a separate hostBuild the admin with the public admin URL and point it at the API host. Confirm the build-time URL and server settings in the docs.CORS must allow the admin origin, and cookies and session handling must work across the two hosts. Proxy rules are needed on each host.When editors reach the admin through a dedicated hostname, or when the admin and API need separate access controls.
Port change behind a reverse proxyChange the port the Strapi process listens on, and keep the public URL unchanged. Rebuild only if the admin URL setting depends on the port.Proxy maps the public port or hostname to the internal port. Forwarded headers must reach Strapi so generated URLs stay correct.When the platform, container, or firewall policy fixes the public ports and Strapi must run on a different internal port.

How the admin URL, build and proxy fit together

The request starts in an editor's browser, which loads the admin page through a reverse proxy that forwards traffic to the Strapi server. The server returns the built admin assets and answers API calls, and it reads and writes content in the separate database. Three settings sit on different layers: the public admin path is set in the build, the API base URL is what the admin calls, and the CORS allowed origins are checked by the server. When you change the admin URL, check all three together, because a change in one layer often breaks the others.

Request path from editor browser to Strapi, with the layers each URL setting touches.

How to change the Strapi admin path and rebuild

This sequence moves the Strapi admin panel to a new path or host, rebuilds the admin assets, and confirms that the admin, its assets and its API calls all work from the new address.

  1. Confirm version and runtime requirements

    Before changing anything, record the Strapi version, Node.js version and database engine in use, and check them against the installation requirements for that release. Strapi 5 supports PostgreSQL 14 or later, MySQL 8.0 or later, MariaDB 10.3 or later and SQLite 3, and runs only on Active or Maintenance LTS Node.js versions. Confirm the exact supported versions for your installed release in the installation requirements. Done when the team has a written record of the versions and they match the documented requirements.

  2. Back up configuration and database

    Copy the project's configuration files, environment files and any custom admin code, and take a database backup before editing anything. Keep the copy in version control or another location the team can restore from. Strapi's migration guidance says downgrades are not supported, so the backup is the rollback path if a later step fails. Done when the backup has been restored to a scratch environment, or the team has confirmed the restore procedure it will use.

  3. Set the new admin path or host

    Update the admin URL setting and the server settings in the project's configuration so the admin is served from the new path or host, and set the public URL the server reports. Confirm the exact file names and keys for your installed version in the Strapi configuration docs, since they can change between releases. Use the same values in every environment that serves the admin. Done when the configuration files show the new values and a local start logs the expected admin address.

  4. Update reverse proxy routes

    Change the reverse proxy so the new admin path or host forwards to the Strapi server, and keep the API and upload routes forwarding as before. Forward the original host and protocol headers so Strapi builds correct links. Check that the proxy configuration matches the new path, since a path change that is not mirrored in the proxy produces 404 responses. Done when the proxy configuration reloads without errors and a request to the new address reaches Strapi.

  5. Rebuild the admin panel

    Run the admin build command for the project so the compiled admin assets reference the new path or host. Build assets in the same environment and Node.js version used for production. A build made against the old path keeps requesting assets from the old location, so do not reuse earlier output. Done when the build finishes without errors and the output directory has been regenerated.

  6. Restart the server and verify assets

    Restart the Strapi process so it serves the rebuilt admin. Open the new admin URL in a browser with the developer tools open, and confirm the login page loads with its scripts, styles and images returning successfully, with no 404 errors. Done when the page loads from the new address and the network log shows no failed asset requests.

  7. Verify admin API calls and CORS

    Sign in to the admin and open several content types, the media library and the settings pages, then confirm the API calls they make succeed. If the admin is on a different host from the API, review the CORS settings and allowed origins so the browser accepts requests from the new address. Confirm the exact CORS keys in the security configuration docs for your version. Done when signed-in navigation works without CORS errors and a test request from the new origin succeeds.

  8. Record the change and retain the rollback

    Document the new admin address, the configuration keys changed, the proxy rules and the build command used, and keep the earlier backup until the admin has been used for a normal working period. Share the record with the team that runs deployments, so the next upgrade or rebuild keeps the new settings. Done when the change record is stored with the project and the team has confirmed the rollback steps.

Settings to change in each deployment situation

On a developer machine the admin usually stays at the default path, so changes focus on making sure the dev server and the API agree on one origin. Keep local overrides small and separate from production settings so they are easy to revert.

  • Admin path: Set the admin path in config/admin.ts only when the team needs to test the new path early. Otherwise leave the default /admin in place.
  • Server URL: Confirm that the public URL in config/server.ts matches the address you open in the browser, including the port.
  • Admin build: Rebuild the admin after any path change, because the path is compiled into the admin bundle. Confirm this step for your Strapi version.
  • CORS origins: Add the front-end dev origin to the CORS settings in config/middlewares.ts so the front end can call the API. Include the exact scheme, host and port.

After the change, check that the login page, the admin assets and front-end API calls all load, and that the browser console shows no CORS errors.

Why proxy and CORS settings change with the admin URL

Moving the admin panel breaks requests that worked before because the browser now loads the admin from a new origin, and it calls the API from that same origin. The address the browser sees is the one every security check compares against. Before you change the admin path, host or port, confirm three things: the origins allowed to call the API through CORS settings, the path rewriting in your reverse proxy, and any cookie or session domain settings. If any of them still reflect the old address, requests from the new admin URL fail even though the server itself is running. Check the exact configuration keys against the Strapi version you run, since names and locations differ between releases, and confirm them in the project's own configuration files rather than relying on memory.

Editors usually notice the problem as a failed sign-in that loops back to the login screen, a blank admin page, or content lists that never load. Some of these symptoms come from blocked API calls, while others come from session cookies that the browser refuses to send to the new host. The fastest diagnosis happens in the browser developer tools. Open the Network tab, reload the admin, and look for requests to the API that show a failed status or a CORS error in the Console tab. Then inspect the response headers for the allowed origin and the request's cookies in the Application or Storage tab. A request sent from the admin origin with no matching allowed origin points to a CORS setting, while a missing session cookie points to a domain, path or secure-flag mismatch in the proxy or session configuration.

Security risks when the admin URL changes

Moving the Strapi admin panel changes where administrators sign in, which origins the browser trusts and which paths a proxy forwards. Each card below is a gap that tends to appear during the move, with the control to review and the team that should own the check.

Origins left open in CORS

After the admin moves, the old origin often stays in the allowed list while the new one is added beside it. A stale origin lets another site make credentialed requests to the API from a browser session that is still valid. Review the CORS origin list in the Strapi server configuration against the final admin and front-end hostnames, and remove anything no longer in use. The security team should approve the final list and the platform owner should own changes to it.

Strapi SSO docs

Admin paths exposed through the proxy

A reverse proxy that forwards the new admin path without the access rules that protected the old one can expose the login page and admin API to networks that were never meant to reach them. This is common when a proxy rule is copied from a tutorial or when a path prefix is rewritten. Confirm which networks, IP ranges or identity-aware gateways can reach the admin path, and test it from outside the intended network. The platform owner should write the proxy rules and the security team should test them.

Mixed HTTP and HTTPS origins

If the admin is served over HTTPS but the server URL, redirects or front-end references still point to HTTP, browsers may block requests, and session cookies may not be sent as expected. Mixed origins can also cause login redirects to drop back to plain HTTP after sign-in. Check the public URL setting, the proxy's forwarded protocol headers and every redirect target after the move. The platform owner should verify these settings and the security team should confirm that no plain HTTP path remains.

Stale links and bookmarks

Editors, scripts and identity provider callback settings may still point to the old admin path. Old links can lead to a login page on a host that no longer serves Strapi, or to a page that a careless proxy redirects to the wrong place. Inventory every saved link, callback URL and automation that references /admin, and decide whether to redirect or retire each one. The identity team should update callback registrations and the editorial lead should inform editors.

Session and cookie scope

Session cookies are scoped by domain and path, so a change of host or path can leave administrators signed in on one origin and unable to sign in on another. A cookie set too broadly can also be sent to unrelated services on a shared parent domain. Review the cookie domain, path, secure and same-site attributes for the admin session after the move, and test sign-out. The security team should set the cookie policy and the platform owner should confirm it in each environment.

Access restrictions left at the old location

Allow lists, VPN-only rules, SSO enforcement and admin-only firewall rules are often attached to the old address. After the move, the new location may have none of them, while the old one is decommissioned and no longer tested. Map each access control that protected the admin, reapply it to the new host and path, and confirm that a non-admin user cannot reach the login page. The security team should sign off on the mapped controls before go-live.

Questions teams ask before changing the Strapi admin URL

How much effort does changing the Strapi admin URL take?

The effort depends less on the URL change itself and more on how many places the old path is hard-coded. Teams usually check the admin build settings, the server configuration, the reverse proxy rules, CORS allowed origins, and any scripts, bookmarks, or single sign-on redirect URLs that point at /admin. A single host with one proxy and no custom admin build is a small change. Multiple environments, split admin hosting, or a custom admin bundler setup add steps and testing. Ask any provider to list each file, proxy rule and integration it will touch, and to state which environments and test passes are included in the quote.

Can our internal team change the admin URL without outside help?

Yes, if the team has someone who can edit the Strapi configuration, rebuild the admin, and change the reverse proxy and DNS. The work is mostly configuration and verification, not new code. Outside help is most useful when the change touches several environments, when the proxy is managed by another team, or when the admin is part of a regulated system that needs documented testing and change records. Before starting, confirm that you have a staging copy of the production configuration so the change can be rehearsed and rolled back.

Does a custom admin path survive Strapi upgrades?

The path setting is part of your project configuration, so it normally persists through upgrades, but the surrounding pieces can break. Strapi upgrades can change how the admin is built, which affects custom bundler settings, and proxy rules written for an old build may need adjustment. Keep the path change in version control, record the proxy and CORS settings beside it, and add a post-upgrade check that loads the admin at the new path and signs in. Confirm the exact behavior for your Strapi version in the official documentation before you rely on it.

What does the change need from our infrastructure team?

The application team and the infrastructure team share the work. The usual needs are:

  • Access to the reverse proxy or load balancer configuration for the new path or host
  • DNS records for any new hostname, and time for them to propagate
  • A TLS certificate that covers the new hostname
  • A release window that allows a short admin outage and a rollback plan
  • Approval from whoever owns CORS and security headers for the front ends that call the API
What changes for editors after the admin URL moves?

Editors see a new address for the admin and may need to update bookmarks, password manager entries and links in internal wikis. Sessions may end when the host or path changes, so announce the window in advance. Their content, roles and permissions do not change because the URL is a routing setting, not a data change. Ask the provider to include a short editor notice and to verify sign-in from a standard editor account before the change is closed.

What should we ask for in a quote for this change?

Ask for a written scope that lists every file, proxy rule, DNS record, certificate and CORS setting in scope, the environments covered, and the test steps that prove the change worked. Also ask what is one-time work (the change, testing and handover) and what recurs (checks after each Strapi upgrade). Request a rollback procedure, the named approvals needed from your side, and what is excluded, such as changes to single sign-on providers or front-end builds. DeployOpen provides a quote from a written scope, so the scope is the part you control.

What breaks if CORS and proxy settings are not updated?

If the admin moves but the allowed origins and proxy rules do not, the admin may load but fail to call the API, or the browser may block requests from the front end. Symptoms include blank screens, failed sign-in, and requests blocked by the browser's cross-origin policy. Check the CORS settings in the Strapi configuration, the forwarded host and protocol headers at the proxy, and any single sign-on redirect URLs. Test each combination of admin host and front-end origin before go-live, because the failure often appears only in one browser or one environment.

What to confirm in your environment before changing the URL

Moving the Strapi admin off /admin touches the build, the server, the proxy and the people or pipelines that depend on the old address. The cards below list the six points to confirm first, and each one names where the answer comes from so the change does not surprise a team mid-rollout.

Version and build support for the path

Confirm that the Strapi version you run and its admin build process accept the path or host you plan to use. The admin path is set in the server and admin build configuration, so check the configuration keys for your exact version in the Strapi docs and test a production build before touching shared environments. Record the result against the version you will actually deploy, since Strapi 5 ships minor releases frequently.

Node.js versions supported
Active or Maintenance LTS
Installation requirements

Hosting platform limits on admin paths

Managed hosts and PaaS offerings may not allow a custom admin path or a separate admin hostname, or may only expose certain build options. Ask the provider whether the admin can be served from a path or host other than the default, and whether the build step lets you pass the required settings. If the answer is no, the change may need a different hosting model, which changes the cost and scope of the whole project.

Reverse proxy and ingress routing

The new path must match in the reverse proxy or Kubernetes ingress, and the admin assets must resolve under that same prefix. Check how your proxy strips or keeps the prefix, how it forwards the original host and protocol headers, and whether WebSocket or long-polling requests are routed. Test each route with a real browser login, because an asset that loads from the wrong prefix can fail silently.

Certificates and DNS for a new host

A separate admin hostname needs its own DNS record and a certificate that covers it, either a SAN entry on the existing certificate or a new one issued by your certificate process. Confirm who controls DNS and certificate renewal, how long DNS changes take to propagate in your zone, and whether internal resolvers or split-horizon DNS also need the record. Plan a rollback path that keeps the old hostname working until clients have moved.

Plugins and custom admin code

Custom admin panels, plugins, bookmarks, SSO callback URLs and identity provider redirect URIs may all hard-code /admin or the old host. Search your repository and your identity provider configuration for the old path, and check each plugin's admin code for absolute URLs. A missed redirect URI often blocks login only for SSO users, so test SSO logins separately from local logins after the change.

Strapi SSO docs

CI/CD and environment seeding

Build pipelines, smoke tests, health checks, monitoring probes and environment seeding scripts may point at the old admin URL or rebuild the admin with different settings. Confirm that each environment, including staging and disaster recovery, receives the same build setting, and that seeded data or test fixtures do not store the old URL. Agree who approves the change in each pipeline, and record the build setting in version control so a later rebuild does not revert it.

How DeployOpen scopes and delivers admin URL changes

DeployOpen plans and implements Strapi admin URL, host and port changes inside your own infrastructure, with the build settings, server configuration, proxy rules and CORS entries treated as one change. Each engagement starts from a written scope that names the target path or host, the environments involved and the people who must approve the change.

How we scope

  • We confirm the target admin path, host and port, and which environments must change together.
  • We inventory the reverse proxy, load balancer, DNS records and CORS origins that reference the current admin address.
  • We record the Strapi version, Node.js version and build tooling so the change matches your upgrade plans.

How we build

  • We apply the admin path, build and server settings in a non-production environment first, then repeat them in staging.
  • We update proxy routes, TLS certificates and CORS origins as one reviewed change, with each edit tracked in version control.
  • We test login, asset loading, content editing and API calls from every client that depends on the admin address.

How we hand over

  • You receive a written record of every setting changed, the file locations and the reason for each change.
  • A rollback procedure covers restoring the previous path, host and port, with the steps tested before production cutover.
  • Runbook notes explain how the new address behaves during future Strapi upgrades and rebuilds of the admin bundle.

How we support

  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and continuous testing are available as a retainer, which can cover later admin address changes.
  • Ask any partner to confirm the written scope covers both the build changes and the proxy and CORS changes that follow them.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.