How to redirect away from default Strapi URL

System Information
  • OS: Ubuntu 20.04
  • Strapi Version: 3.3.4
  • Node Version: 14.15.1
  • Database: PostgreSQL
  • Server: Nginx

Hello everyone :wave:,

I am trying to keep my Strapi less accessible from someone directly snooping around.
Let’s assume that Strapi is deployed on and the admin is accessible from

Now, I want to migrate any user landing on to but the ones coming to should still work as it is.

Any idea how can this be done? If I am missing any configuration.
Not sure if using the defaultIndex is the right option.
Global Middlewares Configuration (

Once this is done, I will then update the admin.url in the ./config/server.js
Server Configuration (

I know I can achieve this using Nginx Configuration but still, I was hoping if this can be done directly using the Strapi configuration.

Thanks in advance :pray:

Hi @anubhav ,
have you got some solution?