🔐
Security

Hiding and protecting your admin panel: a layered approach

19.11.2026
← All articles

The most valuable door on any website is its admin panel. Whoever gets in can change pages, read orders and customer data, and plant malicious code. That is why bots constantly probe /admin, /wp-admin, /administrator and /login and try to guess passwords. Protecting the panel is not one setting; it takes several layers, each covering the weaknesses of the others.

Hiding is not security, but it cuts the noise

Changing the panel URL is often mistaken for the main defence. If the new address leaks through page code, emails or browser history, it is easy to find. Its real value is that most automated bots only try default paths, so login attempts in your logs drop sharply. Treat it as a convenience on top of real protection: strong passwords, two-factor authentication and access restrictions. If your system lets you rename the admin folder, remember to update the paths in its configuration files too.

Example: a travel agency in Bukhara

A small travel agency in Bukhara sells tours on example.uz and handles orders in the admin panel, used by the director, a manager and an accountant. One day it turns out the manager reused his password on another site that was breached. With only a password in the way, an attacker could have logged straight in. But the panel had two-factor authentication and was limited to the office IP plus an extra server password, so the leaked password was worthless.

Layer one: strong passwords and 2FA

Give every administrator a personal account with a unique password of at least 14 characters, and avoid sharing a single "admin" login. Two-factor authentication asks for a time-based code from a phone app after the password, so a stolen password alone is not enough. Limiting failed login attempts makes password guessing impractical.

Shared accounts are a quiet risk of their own. When three people use one login, nobody can tell who changed a price or deleted an order, and when someone leaves the company the password has to be changed everywhere at once. A password manager removes the main excuse for weak or reused passwords, because nobody has to remember them. Personal accounts also let you grant each person only the rights they need, so an accountant does not have to be able to install plugins.

Layer two: a web server password

HTTP Basic authentication makes the browser ask for credentials before the panel even loads, independent of the site's own code. Create the password file outside the site folder:

mkdir -p ~/.htpasswds
htpasswd -c ~/.htpasswds/admin.htpasswd manager

Then add this to the panel folder's .htaccess, using the full path:

AuthType Basic
AuthName "Restricted area"
AuthUserFile /home/user/.htpasswds/admin.htpasswd
Require valid-user

For WordPress wp-admin, keep admin-ajax.php open, because front-end features rely on it:

<Files "admin-ajax.php">
    Require all granted
</Files>

Layer three: restrict by IP address

If staff work from fixed addresses, allow only those. In Apache 2.4:

<RequireAny>
    Require ip 203.0.113.10
    Require ip 198.51.100.0/24
</RequireAny>

In Nginx, create a location for the panel and keep the PHP handling directives inside it, otherwise PHP requests may bypass the rule:

location /admin/ {
    allow 203.0.113.10;
    deny all;
    # PHP handling directives go here
}

Mobile and many home connections change IPs, so in that case combine the server password with 2FA or connect staff through a VPN.

Monitor and update

Keep the system and plugins updated, remove accounts of former staff right away, and check who is hammering your login:

grep -E "POST /(wp-login\.php|admin)" access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head

On sayt.uz hosting you can create .htaccess and password files in the ISPmanager file manager opened from your cabinet.

Related articles

🔑 Password Policy for Website Users: Modern Rules That Work 🚫 Your IP Is Blacklisted: How to Get Delisted from Spamhaus 🛡️ Protecting wp-login.php from brute-force attacks 🚫 xmlrpc.php: should you disable it, and how to do it safely
🌐 Language
🇺🇿 O'zbek 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓