Skip to main content Skip to footer

Changing your Magento Admin URL

Why Change Your Magento Store Admin URL?

There is an easy way to change the default admin URL in Magento, which will prevent access to the default login screen. This is by no means the final word in securing your Magento installation but it certainly raises the bar to anyone wanting to gain access to your back-end.

How?

Do not use the Admin backend to change it.

1) Login to your back-end and go to System Cache Management

- Flush Magento Cache

- Flush Cache Storage

(You can also delete all files in var/cache/ manually if you prefer.

2) Close the browser tab you are working in, rather than logout normally which may write to the cache you have just cleared.

3)  Using and FTP client, open the local.xml configuration file located in app/etc/ directory in the root of your Magento installation.

Scroll to the bottom of the file and find the section <admin> <routers>. Inside this section, you will see the default AdminHTML name. It will be labelled like this:

<frontName><![CDATA[admin]]></frontName>

Change the word ‘admin’ using letters or numbers only to something that you will remember. It does not have to be complex; use a word you will remember.

4) Try to login with your new admin path using the normal: 
http://magentodomain/admin/ and replace 'admin' with your new path.

NB: If you get a 404 error when you try to browse to the new Admin login URL:

- try to clear your browser cookies for the site. Also, try to login from another browser that you have not previously used to access the backend.

- if this does not work use your FTP client to delete all files in your /var/cahche folder and then try again

Browsing to your original admin URL should produce a page not found error, which is exactly our intention.

About the author

Howard Rybko

Involved in software development and web since 1996 (Hypermedia company established for web design and hosting). Specialist in software design, integration and implementation management. Experienced in c#, SQL, and project management. Working on Magento stores and integration since 2013.