By default, Magento uses /admin as the backend URL. Attackers and bots know this and constantly scan it with brute force and automated tools.
If you leave the path unchanged, your store becomes an easy target for password guessing and login abuse.
Changing the admin path does not replace other controls like strong passwords or 2FA, but it adds a strong layer of protection. It hides the entry point and makes automated attacks far less effective because attackers must first guess where the login page is located.
# Check the backend URL setting
grep backend_frontname /var/www/magento/app/etc/env.php
# Or log in and confirm under:
Stores → Configuration → Advanced → Admin → Admin Base URL
app/etc/env.php and set a custom backend_frontname value.# env.php still uses the default
'backend' => [
'frontName' => 'admin'
],
# env.php with custom backend path
'backend' => [
'frontName' => 'securepanel_9x3k'
],