719-286-0751 [email protected]

How to change the Admin Url in Magento

How to change the Admin Url in Magento

Wondering how to change the admin URL in Magento? That’s what we’re here for.

An easy way to protect your Magento store from being hacked is by having a unique URL for your admin panel. By default, the admin panel is always located at www.domain.com/admin. This is considered bad practice because if a hacker detects you’re running Magento, they can start trying random usernames & passwords at this location. Too many people leave their username as “admin” – meaning a hacker only has to guess the password.

You can easily change the URL of the admin panel by modifying local.xml. You can always find this file in:

app/etc/local.xml

By default, the contents of the file end in:

<config>
<!-- other directives -->
<admin>
    <routers>
        <adminhtml>
            <args>
                <frontName><![CDATA[admin]]></frontName>
            </args>
        </adminhtml>
    </routers>
</admin>
</config>

You’ve probably already guessed this, but you can simply change frontname from “admin” to the URL of your choice:

<config>
<!-- other directives -->
<admin>
    <routers>
        <adminhtml>
            <args>
                <frontName><![CDATA[cadence_admin]]></frontName>
            </args>
        </adminhtml>
    </routers>
</admin>
</config>

The above code now places the admin panel for your store at www.domain.com/cadence_admin – simply clear your cache and navigate to the new URL you’ve chosen.

Need Even More Security?

Checkout Magento’s offical article on security best practices. This goes over ways to protect your admin panel through IP white-listing, two-factor authentication, and much more!

Alan Barber is the Lead Web Developer at Cadence Labs and a Magento Certified developer.

 

Submit a Comment

Your email address will not be published. Required fields are marked *

Install our webapp on your iPhone! Tap and then Add to homescreen.
Share This