Bad URL Access and File Extensions

What It Does

Bad URL Access and File Extensions blocks direct access to URLs and files that expose information about the site.

Two modes:

  • Disallowed: blocks a list of sensitive WordPress core URLs. No extra setup.
  • Allowed (expert mode, SecuPress Pro): allows only a list of core URLs. Other access of that kind is denied. Extra allowed URLs or folders can be added, one per line, kept only when the file or folder exists.

Turning this protection on also turns on Bad File Extensions, which denies access to files with a bad extension in the uploads folder. Turning it off removes both sets of rules.

Why It Matters

Addresses such as readme files, some core URLs, or a script dropped in uploads give an attack the version, the layout, or an entry point. Blocking URLs without blocking extensions leaves one of the two open.

How to Use

Open the Sensitive Data module, content protection section.

  1. Choose Yes, block a list of disallowed URLs from WP core.
  2. In expert mode, you can instead choose Yes, only allow a list of URLs from WP core, then fill Custom allowed URLs and Folders if a legitimate file is blocked.

If .htaccess or web.config is not writable, SecuPress shows the rules to paste. On Nginx, the rules go into the server configuration.

If a block cannot be solved with the allowed URL list, switch back to Disallowed.