Give schools and companies access by IP address (IP Exceptions)
The IP Exceptions add-on lets everyone at a school, library, or company read your content without subscribing. You add the institution's IP addresses, and any reader visiting from those addresses gets full access automatically, with no login and no paywall.
This article covers version 1.6.0 of the add-on. IPv6 addresses, the save warning, and the access bar need 1.6.0 or later.
Add an institution
- Go to Leaky Paywall > IP Exceptions and click Add New.
- Enter the institution's name as the title, for example Brooklyn Law School. Only you see this.
- Set Status to Active.
- Paste the institution's addresses into Allowed Addresses, one per line.
- Optionally add a Display Message and Admin Notes (both explained below).
- Click Publish.
Access starts right away. To pause an institution, for example when a subscription lapses, set its status to Inactive instead of deleting it, so the addresses are there when they renew.
Address formats
Institutions usually send their addresses from their IT department or library. Paste them exactly as you receive them. These formats all work:
- Single address:
203.0.113.5 - Range:
203.0.113.0 - 203.0.113.255 - Whole block:
203.0.113.*or203.0.113.0/24 - IPv6: a single address like
2001:db8::1, a range, or a block like2001:db8::/32
A comma-separated list is fine too. It is split into separate lines when you save.
If you see a warning after saving
When you save, Leaky Paywall checks every line in Allowed Addresses. Any line it can't read as an address or range is listed in a yellow notice at the top of the page.
Those lines are ignored, so readers from them will still see the paywall. Common causes are a typo (139.234.23423 is missing a section), a web address pasted in by mistake, or a range written backwards. Fix the line and save again. The entry is saved either way, so nothing else is lost.
Show readers who is providing their access
Add a Display Message to an institution and readers visiting from its addresses see it in a slim bar at the top of every page, for example:
Access provided by Brooklyn Law School Library.
This tells readers why they can read everything, and it shows the institution that their subscription is being used, which helps at renewal time. You can include a link and basic formatting.
Leave the message blank and no bar is shown. Readers from other addresses never see it.
The bar works with page caching. A reader sees the message within their first page view, and it stays for the rest of their visit. If you change a message, readers already on the site see the update on their next visit.
Admin Notes
Use Admin Notes for anything you want to remember about the institution: contract dates, the contact who sent the addresses, or the renewal price. Notes show in the IP Exceptions list and are never shown to readers.
Test that it works
- Search the web for "what is my IP" to find your current address.
- Add a new IP exception called Test with that address and a Display Message.
- Open your site in a private browser window. You should see the access bar and be able to read restricted articles.
- Set the test entry to Inactive when you're done. Otherwise everyone on your network keeps free access.
Things to know
- Access follows the network, not the person. Readers at home or on mobile data aren't on the institution's network, so they see the paywall as usual. If the institution uses a proxy service for remote access, ask them for the proxy's address and add it too.
- Matching readers can read everything, whether or not they're logged in, and their visits don't count against any article limit.
- Administrators always bypass the paywall, so test in a private window while logged out.
For developers
If your theme has an element with the class lp-ip-banner, the Display Message is placed inside it instead of in the bar at the top of the page. The bar itself uses the classes lp-ip-banner lp-ip-banner--auto if you want to restyle it.
The visitor's address is read from HTTP_CLIENT_IP, then the first entry in X-Forwarded-For, then REMOTE_ADDR, and can be changed with the leaky_paywall_ip_address filter.