My Private Site Block IP is a premium add-on for the My Private Site plugin that empowers administrators and site owners to block specific visitors by their IP address.

It adds an extra layer of security and control to your private WordPress site, allowing you to prevent unwanted or unauthorized guests from even reaching the login page or any content.

IP-Based Blocking (IPv4 & IPv6 Support)

Block single IPs or entire ranges across IPv4 and IPv6 to stop unwanted visitors before they reach any part of your site.

Block specific IPs or entire ranges

You can block access from any IP address or whole blocks of addresses. The plugin supports individual IP entries as well as CIDR notation for IP ranges (for example, 168.0.0/24 to block a range of IPv4 addresses). This makes it easy to ban a single malicious actor or an entire network in one step.

Block IPv6 ranges

Block IP supports IPv6 addresses in addition to IPv4. As more internet traffic moves to IPv6, this ensures your site is future-proofed. You can block newer IPv6 addresses or subnets as confidently as traditional IPv4.

Complete lockout

Any visitor from a blocked IP or from within a blocked range will be completely locked out of your site. They will not be able to view any page, attempt to log in, or interact with your site’s API.

The plugin responds with a 403 Forbidden error as soon as a request from a banned IP is detected. This happens before any content is shown, providing a firm barrier against unwanted visitors.

Flexible Blocking Scope

Choose how broadly to apply blocking so you can protect the entire site or just the public-facing pages without locking out admins.

Entire site vs. front-end only

My Private Site Block IP gives you granular control over where the blocking applies. You can choose to block an IP across your entire site, which prevents reaching the login page, wp-admin dashboard, or any REST API endpoints, or choose front-end only, which blocks public-facing pages while still allowing access to the login and admin for that IP.

This flexibility is useful in scenarios where an admin might accidentally block a trusted IP. In front-end only mode, an administrator at a blocked IP can still log in and manage the site, while non-logged-in visitors from that IP are barred from seeing any content.

The default and recommended setting is entire site for maximum security, ensuring a blocked IP cannot access any part of the site. If needed, switch to front-end only to avoid locking out admin access for a known IP.

Seamless enforcement

These scope settings integrate with My Private Site’s privacy features. Even if My Private Site normally allows certain pages to be viewed publicly or allows the login page to load, Block IP’s entire site mode will override that for banned IPs.

A banned IP will not see anything, not even a login form, if the scope is set to entire site. This ensures IP-based rules take precedence when you need them to.

Proxy & CDN awareness (accurate IP detection)

Ensure accurate client IP detection behind proxies and CDNs (Content Delivery Networks) so your block rules apply to the real visitor, not the intermediary servers between the visitor and your site.

Trust proxy option

Many sites sit behind proxies, load balancers, or CDNs like Cloudflare. In these cases, the visitor’s IP might be hidden behind a proxy’s IP address. Block IP provides a Trust Proxy or CDN Headers setting that, when enabled, checks standard proxy headers to find the user’s real IP address.

Header support

Block IP checks headers such as X-Forwarded-For, CF-Connecting-IP for Cloudflare, X-Real-IP, and others. If your site is behind a supported trusted proxy or CDN, enabling this ensures an attacker cannot bypass the IP block by hiding behind a proxy. Their actual IP is still identified and blocked.

Smart defaults

By default, Block IP is conservative and relies on the server’s REMOTE_ADDR if proxy headers are not trusted. This prevents false positives or spoofing. If you know your site is behind a reliable proxy, turning on Trust Proxy gives you accurate client IP detection, which is crucial for effective blocking in those environments.

Admin’s IP visibility

The Block IP settings page shows the detected IP addresses for your current session. If you are an admin configuring the plugin, you can confirm the IPs your request comes from. This helps prevent mistakes such as blocking your own IP. You can also hide this from being displayed, for those times you might be sharing your screen, doing a webcast, or a training/Zoom session and don’t want the viewers to know your IP.

User-friendly management interface

Manage blocks efficiently with bulk import and export, search and filters, and safe in-place editing in a single, integrated settings page.

All features of Block IP are managed through an intuitive interface in the WordPress admin, integrated directly into the My Private Site settings. The UI handles everything from one-off IP blocks to managing large lists with ease.

Integrated settings page

Block IP’s controls live under the Site Privacy settings Protection tab, of My Private Site, keeping all privacy and blocking options in one place. If you are already using My Private Site, the Block IP section appears as a natural extension of your existing settings.

Add multiple IPs easily

You can add IP addresses or ranges via a simple text area input. Enter one entry per line, such as a single IPv4 or IPv6 address or a CIDR range like 203.0.113.0/24, and click Save IP Data. Block IP processes the list and adds all valid entries to the block list in one step. This bulk-add method avoids submitting each IP individually.

CSV bulk import

For larger lists or migrating from another system, Block IP includes a CSV import feature. You can upload a CSV file or a simple text file containing IPs and optional notes, and the plugin imports them all.

A Download CSV Template button provides a sample file format with three columns: one for the IP or CIDR range, a column for the scope (all or front-end only), and an optional second column for a note or description. You can include a header row or leave it out.

Export and backup

You can export your entire blocked IP list to a CSV file at any time. The interface offers an Export CSV button with options to export all entries, just the selected entries, or the filtered results. This allows you to back up the list, analyze it offline, or import it to another site.

Search and filter tools

To manage large lists of IPs, the admin page includes search and filtering controls. You can search by IP address, range, or the note attached to an entry, and filter by IP version to show only IPv4, only IPv6, or all. The interface updates to show entries that match your query and version filter, with Apply and Reset controls.

Paginated list for easy browsing

The blocked IP list appears in a table showing the IP or range, your custom note, and the date added. For long lists, the plugin divides the list into pages, with Prev and Next navigation and total item and page indicators to keep the interface fast and clear.

Inline notes and editing

Each blocked IP entry can have a note explaining why the IP or range was blocked, such as “Known spammer,” “Terminated employee,” or “Repeated login attempts.” Notes appear in a dedicated column and can be edited in place. When finished, click Save Edits to save all changes at once, making it quick to keep notes up to date.

Bulk selection and deletion

Bulk actions make list management easier. Select multiple entries using the checkboxes next to each IP, or use Select All to choose every entry on the current page. With entries selected, choose Delete Selected to remove them together. For a full reset, use Delete All, which removes every entry in the block list with an extra confirmation step to prevent accidents.

Every aspect of the interface is designed to be straightforward and efficient, even for non-technical users. Whether you are adding new blocks, importing a list, or searching through hundreds of entries, Block IP’s admin tools make the job simple.

Robust security and performance

Enforce IP blocks early and efficiently using optimized lookups and caching while avoiding interference with legitimate site processes.

Under the hood, My Private Site Block IP employs smart engineering to ensure that blocking is effective, performant, and safe for your site’s operations.

Immediate enforcement

When a banned IP tries to load any part of your site, Block IP intervenes. It checks the visitor’s IP against the banned list at multiple points in the page load process, such as early in the page header, during template loading, and before REST API calls, to ensure nothing slips through.

If there is a match, Block IP halts the request and returns a “Forbidden: Access blocked by My Private Site” message. This happens quickly, before heavy PHP or database processes run, which protects content and saves server resources.

Optimized IP lookup

Block IP is built to handle large lists of IPs and ranges without slowing down your site. All blocked IPs are stored in a dedicated database table with an efficient structure.

Block IP uses a binary format for IPs and maintains proper indexes on range boundaries. It can perform fast queries to check an incoming IP against thousands of banned ranges using indexed lookups rather than scanning everything.

Caching for speed

In addition to optimized queries, Block IP implements an in-memory cache for IP checks. After an IP is checked once, the result is stored temporarily. If the same visitor continues browsing or multiple requests come from the same IP, the plugin reuses the cached result and avoids repeated database calls.

No interference with legitimate processes

Block IP targets real web requests from users and avoids interfering with background tasks or administrative actions that WordPress needs.

It detects WordPress cron jobs and WP-CLI tasks and lets them run regardless of IP. If you are working in the admin and your IP is blocked but you allowed front-end only scope, the plugin respects that and does not interrupt your session.

Blocking focuses on the contexts that matter without disrupting normal operation or maintenance.

IPv6 handling and validation

The IP parsing engine normalizes and validates every IP address you enter. It handles edge cases like IPv6 localhost and IPv4-mapped IPv6 addresses by translating them to a canonical form so there is no confusion. The blocking logic does not miss an IP due to formatting differences, and invalid IP strings are rejected.

In short, Block IP is engineered to be fast and reliable. It provides heavy-duty security by blocking bad actors outright while remaining light on server load. Trolls, bots, and attackers are stopped at the door, and you will not notice a performance difference on your site.

Final thoughts

My Private Site Block IP brings peace of mind to WordPress site owners who require on-demand privacy and tight control over visitor access.

It combines ease of use so you can implement IP bans in seconds with enterprise-grade capability that scales to large lists and handles modern network setups.

Block IP is an essential tool for enhancing your site’s security and privacy, keeping unwanted eyes out while you focus on engaging with the audience you want.

Get Plugin Update News

Get Plugin Update News

Subscribe and stay up-to-date on David's development projects and plugin status.

You have Successfully Subscribed!