How to change admin URL in Magento 2

In this instructional exercise, we will demonstrate to you industry standards of how to change Magento 2 admin URL. The Magento 2 administrator URL ought not to be administrator or backend or whatever another simple way which could be simply recognized by the assailant. The backend URL can contain alphanumerically esteems, the underscore character _ and the dash character – as it were. Having a one of a kind administrator way builds the security only a tad. The most secure path for your Magento 2 backend is to confine the entrance through IPs or VPN.

On the off chance that you don’t have the likelihood to limit the Magento 2 admin URL by means of IPs or VPN then we prescribe to transform it on a regular premise. You can also hire our in-house magento developer to get your work quickly done. 

Change the Magento 2 admin URL

Method 1 – From Admin Panel


Store > Configuration > Admin > ADVANCED > Admin Base URL > Yes > Custom Admin Pathssh your-username@$your-server-ip


Enter your desired custom URL. Done!

Method 2 – Using ssh

Login into your Magento 2 Server with SSH

ssh your-username@$your-server-ip


Navigate to the Magento 2 directory e.g.

cd /home/cloudpanel/htdocs/


Use the Magento 2 CLI in order to the admin URL

php bin/magento setup:config:set --backend-frontname='secureAdmin123'

STEP 4: 

To check what your current Magento 2 admin URL is, you can run the following command

php bin/magento info:adminuri

Method 3 – Editing env.php

Different way to change  Magento 2 admin URL is to edit the file app/etc/env.php

If you open the file it looks like the following excerpt:

return array (
  'backend' =>
  array (
    'frontName' => 'admin',
Categories : Magento magento 2

Book Now

Let's Digitized your Store Operations