← All articles

Hardening · 2026-06-27

Magento Admin Panel Security: Stop Brute-Force & Account Takeover

The Magento admin is the keys to the kingdom — orders, customer data, payment config and code. It's also the most attacked surface: automated bots hammer default admin URLs with credential-stuffing every day. This guide covers Magento admin security — the controls that actually stop brute-force and account takeover.

Not sure if your admin is exposed at a guessable URL? Run a free scan — MageArgus flags a discoverable admin path.

By the numbers
  • A discoverable /admin URL is a top brute-force entry pointMageReport / incident-response findings
  • Magento 2.4+ ships 2FA built-in (Magento_TwoFactorAuth)Adobe Commerce docs

Move the admin off the default URL

Leaving the admin at /admin lets bots find it instantly. Set a custom, unguessable frontName:

bin/magento setup:config:set --backend-frontname="admin_$(openssl rand -hex 6)"
bin/magento cache:flush

This is obscurity, not security — but it removes you from mass scans, which cuts brute-force noise dramatically.

Enforce two-factor authentication

2FA is the single most effective control against stolen/guessed admin passwords. Magento ships it — make sure it's enabled and enforced for every admin user:

bin/magento module:status Magento_TwoFactorAuth
# Stores → Configuration → Security → 2FA

Restrict and rate-limit access

Audit admins and integration tokens

Attackers create rogue admin users and integration tokens to persist after a breach. Review them regularly and remove anything unfamiliar — check System → Permissions → All Users and System → Integrations. Set session lifetime and password-expiry policies under Security config.

Frequently asked questions

Is changing the admin URL enough?

No — it reduces automated attacks but isn't real protection on its own. Combine it with 2FA, strong passwords, IP restriction and rate limiting.

Can MageArgus tell if my admin is exposed?

Yes — the scan checks common admin paths and flags it as a brute-force risk if the login is reachable at a default URL.

Related reading

Scan your store free →