Skip to Content
Workspace & SettingsProtectionSet Up Landing Page Protection

Set Up Landing Page Protection

Landing page protection stops a lander from being opened directly. When a visitor arrives through a Nitoriq campaign, Nitoriq adds a short-lived signed token to the lander URL. A snippet you deploy on the lander’s server checks that token and refuses the visit when it is missing, expired, or forged.

Use this guide to protect a lander, deploy its snippet, and confirm the live page refuses direct visits.

Preparation

Before you start

  • You need permission to edit assets. The snippet contains the lander’s signing secret, so only people who can edit assets can see, copy, or check it.
  • You need access to the server or Cloudflare account that serves the lander.
  • Decide where the snippet will run: PHP, Node / Express, or a Cloudflare Worker.
  • Send traffic to the lander through Redirect campaigns.

Protect a lander

Turn protection on

Open the lander from Assets > Landers, or use Edit protection on Settings > Protection > Landing Page Protection.

In the Protection section, switch on Enable landing page protection, choose the Preferred runtime, and click Save. The modal stays open, and the Validation snippet field fills in with the snippet for that runtime.

Copy the validation snippet

Click Copy on the Validation snippet field. You can also copy it later with Copy snippet on Landing Page Protection.

Keep the snippet on your server only. Anyone who has it can open the page without going through your campaign.

Deploy the snippet

Install the snippet where it runs before the lander’s HTML is served:

  • PHP: place it at the very top of the lander file, before any HTML output.
  • Node / Express: register it as middleware before the route handler that serves the lander page, and keep it off the routes that serve your images, scripts, and stylesheets.
  • Cloudflare Worker: deploy it as a Worker on a route that covers only the lander and its own files, for example example.com/offer/*.

On a Cloudflare route, the lander’s CSS, scripts, images, fonts, and video load without a token, but every HTML page needs one. Keep other pages, such as your home page, privacy policy, or thank-you page, off the route, or visitors will be refused there too. Form submissions on the route also need a valid token, so point the lander’s forms at an address outside the route.

Check the live page

Use Check the live page in the lander modal, or the check action on Landing Page Protection.

Nitoriq visits the lander’s saved URL twice, once without a token and once with a valid one. A working snippet refuses the first visit and serves the second.

The check works on public HTTPS pages on a regular domain. A firewall or bot protection in front of the page can block the check even when the snippet is working.

When The Check Doesn’t Pass

ResultWhat to do
The page loads without a tokenThe snippet isn’t running on the page at the saved URL. Deploy it on that exact page or route.
The page refused a valid tokenThe deployed snippet is out of date. Copy it again and redeploy. If it is current, check whether a firewall or bot protection is blocking Nitoriq.
The page redirects somewhere elseSet the lander URL to the page’s final address.
The page can’t be checkedThe lander URL uses HTTP, an IP address, or a non-standard port. Only public HTTPS pages can be checked.
The page gave an unexpected responseThe page answered with an error rather than a refusal or the page itself. Confirm it loads normally through a campaign, then check again.
The page took too long, or couldn’t be reachedConfirm the page is online, then check again.
Validation

Success looks like

  • Check the live page reports that the snippet is working
  • opening the lander URL directly in a browser shows a refusal
  • a test click through the campaign’s tracking link opens the lander
  • the lander shows as Protected on Landing Page Protection

Turn Protection Off

Remove the snippet from the lander’s server first. Then open the lander, switch off Enable landing page protection, and save.

Once protection is off, Nitoriq stops adding the token, so a snippet still deployed on the page refuses every visitor.

Change The Token Settings Through The API

The token’s query parameter, lifetime, and browser binding can be changed through the API. If you change the query parameter or browser binding, deploy the updated snippet at the same time. The deployed snippet checks the old settings until you replace it, and refuses visitors in the meantime.

Landing Page Protection Settings

Settings > Protection > Landing Page Protection lists every lander in the workspace with its protection state.

Landing Page Protection columns and actions

Status

Protected, Unprotected, or Rotating while a secret rotation is in progress.

A Rotating lander has a rotation waiting to be finished or cancelled.

Runtime

The runtime the lander's snippet is built for.

The snippet must match the environment that serves the lander.

Edit protection

Opens the lander so you can change its protection settings.

Protection is saved on the lander itself.

Copy snippet

Copies the lander's current snippet. Shown to people who can edit assets.

Always deploy a freshly copied snippet after a change or rotation.

Check the live page

Confirms the deployed snippet refuses direct visits and accepts Nitoriq's token.

It shows the page is protected without waiting for live traffic.

Rotate secret

Replaces the lander's signing secret. Shown to people who can manage workspace settings.

Rotate on a schedule, or immediately if the secret or snippet has leaked.

Was this page helpful?