Why admin panels get attacked
Your admin panel controls everything: content, customers, orders, users. Bots scan the internet for well-known admin paths — /wp-admin, /admin, /administrator, /user/login, /phpmyadmin — and then try leaked passwords against them. An exposed admin login is one of the most frequent high-severity findings in small business security scans.
1. Require two-factor authentication
This is the single most effective step. Even if a password leaks, the attacker cannot log in without the second factor. See two-factor authentication for websites.
2. Restrict who can reach it
- IP allow-listing: only your office or VPN can load the admin path.
- A second layer: HTTP basic authentication or a zero-trust access proxy in front of the admin area.
- A different hostname: serve admin from a separate subdomain with its own restrictions.
Changing the admin URL helps reduce noise but should not be your only protection.
3. Stop password guessing
- rate limit login attempts and add lockouts — see brute force attacks
- block known leaked passwords — see credential stuffing
- do not reveal whether the username or password was wrong
4. Keep accounts tidy
- one named account per person — no shared "admin" logins
- remove leavers immediately
- give the minimum role each person needs
5. Never expose database tools
phpMyAdmin, Adminer and similar tools should never be publicly reachable. Remove them or restrict them to your IP.
6. Protect the session
Admin cookies should be Secure, HttpOnly and SameSite — see cookie security flags. Use short idle timeouts for admin sessions.
7. Log and alert
Record admin logins and send an alert for new devices or locations. Review admin activity after any suspicious event.
Quick check
Our secure login page guide covers customer logins too. To see whether your admin panel is visible from the internet, run a free scan — Yrzo AI flags exposed admin and database tools with the exact fix.
Related reading: Account Takeover Prevention: Protecting Customer and Staff Accounts · Magento Security Checklist for UK Online Retailers · Bad Bot Protection: Stopping Scrapers, Spam and Login Attacks