WordPress lets anyone visit example.com/?author=1 and get redirected to that author’s archive, which reveals their username. Attackers loop through numbers to collect usernames, then guess passwords. This is called user enumeration.
The setting
Aegisify Shield → Hardening → Basic Hardening → Block user enumeration offers two responses:
- Redirect ?author=N URLs to homepage (default): the request goes to the home page, so no username is revealed. This is less disruptive than an error.
- Return 404 for user enumeration attempts: the request receives a “not found” response.
Hardening must be enabled for either to apply.
The REST API is another source
WordPress also lists users at /wp-json/wp/v2/users. Set Anonymous REST API behavior to Block anonymous WordPress user endpoints only to close that path while keeping other REST features working. The stricter “Restrict anonymous REST access to limited public content” mode should be tested first, because it can affect headless sites and integrations.
Does this hide author names on posts?
No. Display names shown on posts are separate from login usernames. Make sure each user’s display name is not the same as their login name.
Search engines
With Search and AI crawler compatibility on (default), recognized crawlers can still reach public content. Login, admin, and other protected areas are never opened to them.
Related: Block unknown usernames, Hardening module.
