Lorixen.
EN

Locking down your website's admin area

Short answer: Your website's admin area, whether it is a WordPress dashboard, a shop back office or a custom staff panel, is the most valuable door on the site, and by default it is open to the whole internet. Put extra layers in front of it: multi-factor authentication for every admin account, a second barrier at the server or network level such as an IP allowlist, single sign-on or HTTP authentication, and ideally a separate hostname for staff tools. Keep public features that the admin path happens to serve working, and log every admin sign-in.

Why the admin login gets so much attention

Automated bots scan the web for well-known admin paths and try leaked passwords, default usernames and known plugin weaknesses, day and night. WordPress's own hardening guide notes that many WordPress attacks are carried out autonomously by malicious software bots, and that the most common attacks involve specially crafted requests exploiting outdated software and attempts to gain access by guessing credentials.

A small business rarely has a reason for its admin login to be reachable by everyone in the world. Staff usually work from an office, a few home connections or company devices. That gives you room to restrict access without inconveniencing anyone.

Layer one: strong sign-in for every admin

Before network restrictions, fix the accounts themselves:

  • Multi-factor authentication for all admin and editor accounts, with no exceptions for the owner.
  • Unique accounts per person, never a shared "admin" login, so you can remove access when someone leaves and see who did what.
  • Least privilege: most people need editor or shop-manager roles, not full administrator.
  • Remove old accounts of former staff, agencies and freelancers.

OWASP's Authentication Cheat Sheet also recommends requiring re-authentication for sensitive features, such as changing payment settings or adding new administrators.

Layer two: a barrier before the login page

The idea is that attackers must get past something before they even reach your application's login form.

IP allowlist. If staff connect from known addresses, allow only those. On nginx, for example, the access module's allow and deny directives limit access to certain client addresses; its documentation shows a block allowing specific networks and ending with "deny all", noting that rules are checked in sequence until the first match. Apache, CDNs and web application firewalls offer equivalent rules. For staff without fixed addresses, a company VPN gives them one.

Server-side password protection. WordPress's hardening guide suggests adding server-side password protection, such as HTTP Basic authentication, to the admin directory as a second layer around the admin area and login screen, forcing bots to attack that layer first.

Single sign-on or an access proxy. Many businesses already use a work identity provider. An identity-aware proxy or zero-trust access service can require staff to sign in with that identity, including its MFA, before the admin path is reachable at all.

Do not break what the public needs

Admin paths sometimes serve public functions. WordPress's guide warns that protecting the wp-admin directory can break functionality such as the AJAX handler at admin-ajax.php, which some themes and plugins use for visitors. When adding restrictions:

  • Exclude the specific public endpoints, such as admin-ajax.php, from the barrier.
  • Test the public site, forms, cart and checkout after the change.
  • Check scheduled tasks, payment callbacks and webhooks still reach the endpoints they need.

Layer three: separate hostnames for staff tools

For custom apps, consider serving the admin interface from its own hostname, such as admin.yourdomain, or a separate application entirely. That makes it easier to apply strict network rules, different session settings and stronger security headers without affecting customers. It also reduces the damage if a flaw in the public site is found.

Avoid relying only on renaming the login URL. It cuts down noisy bot traffic, but it is obscurity, not protection, and the new address often leaks through emails, browser history or plugins that link to it.

Watch and respond

  • Log every admin sign-in with time, account and IP address, and review unusual ones.
  • Alert on new administrator accounts and changes to payment or shipping settings.
  • Rate-limit login attempts so password guessing is slow.
  • Keep the platform, themes and plugins updated, since many attacks target known flaws rather than passwords.
  • Review the list of admin accounts every quarter and remove anyone who no longer needs access.

When staff travel or work from anywhere

IP allowlists are awkward for teams without fixed locations. Options:

  • A VPN that gives everyone a known address.
  • An access proxy using your identity provider, which works from anywhere but still requires company sign-in.
  • Temporary allowlist entries with an expiry for one-off trips.

Choose the option your team will actually use; a rule people constantly bypass is worse than a slightly weaker one they keep.

A worked example

A hypothetical Waterford bakery chain ran its online ordering on WordPress with WooCommerce. Its logs showed thousands of login attempts per day against the admin login, and a former agency account still had administrator rights.

The owner's developer removed old accounts, moved most staff to shop-manager roles, enabled MFA for everyone, and added an IP allowlist for the admin area that covers the head office and the company VPN, while excluding admin-ajax.php so the public ordering pages kept working. Admin sign-ins are now logged with alerts for new administrators. Login attempts against the admin area dropped to almost nothing, and staff noticed no change apart from the MFA prompt.

FAQ

Will an IP allowlist lock me out?

It can if your office address changes. Keep a fallback, such as hosting control panel access, to update the rule.

Is a security plugin enough?

Plugins help with MFA and rate limiting, but a barrier at the server or network level stops requests before they reach the application.

Does this apply to hosted shop platforms?

Hosted platforms control their own admin access; use their MFA, staff roles and login alerts.

If your admin login is open to the whole internet and you're not sure what to restrict, tell us how your team reaches it.

Sources

WhatsAppBook a call