The idea
Single pages that stay public are already in Bricks (Exclude posts/pages), so Kiln adds the rest: whole post types, an IP list and a share link.
How to use it
- Turn on maintenance or coming-soon mode in Bricks > Settings > Maintenance mode.
- In Bricks > Kiln, under Admin & agency, turn on Admin: maintenance mode bypass. Click Save modules. The module is off by default.
- Open Settings under the module and fill in what you need.
Let specific people through by IP address
- In Allowed IP addresses, enter one address per line, IPv4 or IPv6. The field shows your own address as the server sees it.
- Click Save modules. Kiln drops lines that aren't valid IP addresses.
Let anyone with a link through
- Click Save modules once with the module enabled. A Share link field appears.
- Copy the link and send it. When someone opens it, Kiln sets a cookie that lasts 7 days on that browser and redirects to the same address without the token.
- When the review is over, tick Make a new link when I save and click Save modules. The old link stops working, and so do cookies it already set.
Keep a post type public
- Under Post types that stay public, tick the types you want. Media and My templates are not listed: templates would expose the maintenance page itself.
- Click Save modules. Single pages, the archive (for products, the shop page) and category or tag pages of those types show to everyone. Ticking Posts also opens the blog page.
- Clear your page cache. A cache may still hold the coming-soon page for those addresses, or the real page after you untick a type.
Where it appears in Bricks
Bricks > Kiln, in the Settings disclosure under the module. The module adds nothing to the builder.
How it works with Bricks' own bypass
Bricks decides first. Its role bypass (Bricks > Settings > Maintenance mode > Bypass maintenance), its excluded pages and its login page are all checked before Kiln runs. Kiln can only let more visitors through. If Bricks already lets a visitor in, Kiln does nothing.
Kiln then checks, in this order: a public post type, an allowed IP address, a valid share-link cookie. Per-role bypass and single excluded pages are not part of this module because Bricks has them.
Developers can also write their own rule with Bricks' bricks/maintenance/should_apply filter. Kiln is the
version without code, with a signed share link you can revoke.
Caching
A response that Kiln lets through by IP address or cookie is marked uncacheable: the DONOTCACHEPAGE constant,
LiteSpeed's no-cache call and no-cache headers. This keeps a page cache from storing the real site and showing
it to anonymous visitors. Kiln leaves pages of a public post type cacheable, because everyone may see them.
A CDN rule that ignores those headers, for example Cloudflare "Cache Everything" with an edge TTL, can still cache the real site.
What Kiln checks
- Kiln generates the share-link token. You cannot type your own, and it must be at least 20 characters.
- The cookie carries its own expiry, and a signature that covers the expiry and the token. The server checks both.
- A redirect removes the token from the address bar, matched or not. A wrong token sets no cookie.
- Kiln matches IP addresses on
REMOTE_ADDRonly. It readsX-Forwarded-Forand the other proxy headers only to tell that a proxy is in front of the site, never as a visitor's address.
Limits
- Each allowed address must match exactly. Ranges and CIDR notation such as
203.0.113.0/24don't work. - Behind a proxy or CDN, the server sees the proxy's address for every visitor. When Kiln sees headers such as
CF-Connecting-IP,X-Forwarded-For,X-Real-IPorTrue-Client-IP, the Settings field shows an amber warning and Kiln refuses to save the proxy's own address. Use the share link on those sites. - Anyone who holds the share link can forward it. The link also appears in server logs like any other URL.
- The module lets visitors through only while Bricks' maintenance mode would otherwise block them. A share link is handled at any time while the module is on: opening it sets the cookie and removes the token from the address, also while maintenance mode is off.
Settings
- Allowed IP addresses
- Post types that stay public
- Share link, with Make a new link when I save
Requirements
Bricks 2.4 or newer.