How To Change Magento Admin URL

How To Change Magento Admin URL

How To Change Magento Admin URL

In this tutorial we will help you to change magento 2 admin URL

read carefully and try this steps from your end

Are you still using admin as the administrator path for Magento?

Then it’s time to change to a unique, custom URL from default 'admin' URL.

This can help to reduce the exposure of Magento sites from scripts of hackers.

Changing the default admin path is simple for anyone who knows to edit the text in XML files.

lets start how to change magento 2 admin URL

we are changing from to

To change magento admin url there are two ways:

Method 1: Change in local.xml

Step 1: Navigate to app/etc/local.xml file under your Magento root directory and edit as given below:


Replacing admin path with new custom string ‘newpath’:


Step 2: Save the file

Step 3: Refresh the Cache from Magento Admin (System -> Cache Management)

Now, you should be able to access admin panel from

Method 2: Change from backend settings

This is another easy way to change admin URL from Magento backend admin settings.

Step 1: On the Admin menu, select System > Configure.

Step 2: In the panel on the left, under Advanced, select Admin.

Step 3: Click to expand the Admin Base URL section, and do the following:

3.a. Set Use Custom Admin URL to “Yes.”

3.b. Enter the name of the Custom Admin Path in the following format:

Step 4: When complete, click the Save Config button.

After the changes are saved, you must log in to the Admin using the new Admin URL and path.

We have successfully changed the magento 2 admin URL

  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn
  • Youtube

leave a comment