> For the complete documentation index, see [llms.txt](https://docs.roadmap.so/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roadmap.so/tag-library/how-to-create-a-protected-page.md).

# How to create a Protected Page

Restrict storefront URLs by customer segment, country or password.

Use **Protected Pages** to restrict specific storefront URLs.

This is the right choice for member-only/wholesale landing pages, hidden URLs, VIP access pages, and time-limited campaigns combined with secret product tagging.

### When to use Protected Pages

Choose this tag type when the restriction is tied to a page or URL, not to a product or collection, unless you want an additional layer of password protection.

Protected Pages can either:

* show a page only to a selected audience
* hide a page from a selected audience
* gate a page behind a password

Use cases:

* members-only landing pages
* hidden collection links
* campaign pages
* password-gated access pages

### Before you start

Decide these settings first:

* the exact URLs you want to protect
* who should qualify
* where blocked visitors should go
* whether you also want a password
* whether the rule should start or end automatically

If the page links to a restricted product or collection, plan that rule too.

Protected Pages controls access to a specific URL.

It does not hide the product URLs within this URL on its own. This is where secret product tagging may be more suitable.

### Set up a Protected Pages tag

{% stepper %}
{% step %}

#### Open Tag Library

In Shopify admin, go to **Apps** → **Roadmap Dev** → **Tag Library**.
{% endstep %}

{% step %}

#### Create a new tag

Click **Create a New Tag**.

![Tag Library screen with Create a New Tag button](https://393112916-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8asLD4FVCFagK40xEr4%2Fuploads%2FfjdJUKXrDSb4Z4SnKL2C%2FScreenshot%202026-04-01%20at%2010.20.23%E2%80%AFAM.png?alt=media\&token=3da6c3cd-f14c-4d92-8d4a-219727cd42e3)
{% endstep %}

{% step %}

#### Choose Protected Pages

In the **Select tag type** modal, choose **Protected Pages**.

![Select tag type modal showing Protected Pages](https://393112916-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8asLD4FVCFagK40xEr4%2Fuploads%2FFmZT1ilEIDeIA1d11eH3%2FScreenshot%202026-04-01%20at%209.57.36%E2%80%AFAM.png?alt=media\&token=cce0b32e-1ba5-4583-b90d-9e915fa7e145)
{% endstep %}

{% step %}

#### Add the URLs you want to protect

On the **Protected Pages** screen:

* enter a clear **Tag name**
* paste each URL under **URLs**
* add one URL per line when possible
* add multiple URLs if the same rule should apply to more than one page
* use store-relative paths such as `/pages/loyalty`
* keep **Status** in **Draft** while you set up the tag

![Protected Pages settings showing Tag name, URLs, redirect field, and Customer Eligibility](https://393112916-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8asLD4FVCFagK40xEr4%2Fuploads%2FKEoEaQGqDDbd5vcOPJJu%2FScreenshot%202026-04-01%20at%2012.35.09%E2%80%AFPM.png?alt=media\&token=af96d663-1b99-403c-94ac-1acaa0cf3d16)
{% endstep %}

{% step %}

#### Set the redirect for blocked visitors

Choose a destination in **Redirect ineligible customers to:**.

Use `homepage` for a broad fallback, or enter a path like `/collections/all`.
{% endstep %}

{% step %}

#### Choose who can access the URLs

In **Customer Eligibility**:

* use **The above pages are:** to choose whether the selected audience should see the URLs
* use **only for** to define who qualifies
* add any required extra values, such as Shopify customer tags

![Protected Pages example with URLs filled in and customer eligibility configured](https://393112916-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8asLD4FVCFagK40xEr4%2Fuploads%2FvClPd1AMBOhnmgu3AvfD%2FScreenshot%202026-04-01%20at%2010.53.37%E2%80%AFAM.png?alt=media\&token=244acb71-1996-40d0-8296-89339e821edc)

The available audience options match the ones used in **Secret Products**:

* **all customers**
* **logged in customers**
* **logged in customers tagged with**
* **logged in customers with order history**
* **customers from specific countries**
* **members**
* **non-members**
  {% endstep %}

{% step %}

#### Add password protection if needed

In **Password Protection**, enable **Require password to access the above pages** if you want a password prompt.

Then set:

* **Lock Screen Title**
* **Lock Screen Caption**
* **Lock Screen Password**
* **Lock Screen Background Color**
* **Lock Screen Background Image**

![Password Protection section showing lock screen fields](https://content.gitbook.com/content/J8asLD4FVCFagK40xEr4/blobs/kLZDYYrzC3sqHaZCwThh/protected%20pages%20password.jpg)

{% hint style="info" %}
This is usually paired with **Visible** for **all customers**.
{% endhint %}

You can also combine it with logged-in or member-only access if needed.

Anyone with the password can access the URL, so share it carefully.

The lock screen uses your storefront theme styling, then applies the colours and image you set here.

<figure><img src="https://393112916-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8asLD4FVCFagK40xEr4%2Fuploads%2F5efGtxX421dDvts7Ni8B%2FScreenshot%202026-04-01%20at%2011.01.12%E2%80%AFAM.png?alt=media&amp;token=f5e85ed4-f0c5-42dc-a5f8-e3b21a39a97f" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Add a schedule if needed

In **Active Dates**:

* set a **Start date** and **Start time**
* enable **Set end date** if access should stop automatically
* choose what happens after the schedule ends in **When inactive, the selected pages are:**

Scheduling only controls the protection rule.

It does not publish or unpublish the Shopify page for you.

![Active Dates section showing end date and the When inactive dropdown](https://content.gitbook.com/content/J8asLD4FVCFagK40xEr4/blobs/garbFcUE8aaqYF5rQrzz/Screenshot+2025%2002%2006+at+7_46_10%E2%80%AFPM.png)
{% endstep %}

{% step %}

#### Save and activate

Click **Save**.

Switch the tag to **Active** after testing passes.
{% endstep %}
{% endstepper %}

### URL tips

Use the same storefront path the customer will visit.

Examples:

* `/pages/vip-access`
* `/collections/private-drop`
* `/products/member-bundle`

Add one path per line when possible.

### Common use cases

{% columns %}
{% column %}
{% hint style="success" %}

#### Hide a page from wholesale customers

Use:

* **The above pages are:** **Hidden**
* **only for:** **logged in customers tagged with**
* **Customer Tags:** `wholesale`

Best for pages like a loyalty page that wholesale customers should not see.
{% endhint %}
{% endcolumn %}

{% column %}
{% hint style="success" %}

#### VIP early access, then public access

Set an end date.

Choose **When inactive, the selected pages are:** **Visible**.

Best for launches that should later open to everyone.
{% endhint %}
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% hint style="success" %}

#### Members-only page that stays private

Leave **Set end date** off.

Keep the page restricted indefinitely.

Best for ongoing member resources or private landing pages.
{% endhint %}
{% endcolumn %}

{% column %}
{% hint style="success" %}

#### Short campaign page

Set both a start date and an end date.

Choose the inactive behavior you want after the window closes.

Use **Visible** to open the page later, or **Hidden** to close it again.
{% endhint %}
{% endcolumn %}
{% endcolumns %}

{% hint style="warning" %}

#### Password-gated campaign landing page

Use password protection when you want to share access through email, SMS, or another campaign touchpoint.

In most cases:

* **The above pages are:** **Visible**
* **only for:** **all customers**
* **Password Protection:** enabled

When the campaign ends, set **When inactive, the selected pages are:** to match the outcome you want.

Use **Visible** if the page should become public.

Use **Hidden** if the page should close again.
{% endhint %}

{% hint style="warning" %}

#### Password-gated access to a product or collection

Use **Protected Pages** for the gateway page.

Then create a matching **Secret Product** tag for the product or collection itself.

Without the product-side rule, the product or collection can still be reached directly.
{% endhint %}

### Test before launch

Check all of these before you activate the tag:

* the exact protected URL redirects when the customer should be blocked
* the allowed customer can open the URL
* the redirect destination is correct
* the password works, if enabled
* the schedule and inactive behavior match the outcome you want

### Fix common issues

<details>

<summary>I can still access the page when I should be blocked</summary>

Check these first:

* the tag **Status** is **Active**
* the exact URL path in **URLs** is correct
* the test customer matches the eligibility rule
* the protection rule is within its active schedule

</details>

<details>

<summary>Customers are being redirected unexpectedly</summary>

Review **Redirect ineligible customers to:**.

Anyone who does not qualify, or is outside the active schedule, will be sent there.

</details>

<details>

<summary>The page should be public now, but it is still restricted</summary>

Check **When inactive, the selected pages are:**.

If you want the page to open after the schedule ends, this must be **Visible**.

</details>

<details>

<summary>The password page works, but the product is still visible without the password</summary>

Protected Pages only controls the page URL.

If you are running a password-gated product or collection campaign, add a matching **Secret Product** rule too.

</details>

### Related guides

* [Customer eligibility controls in Tag Library](/tag-library/understanding-customer-eligibility-controls.md)
* [Schedule start and end dates in Tag Library](broken://spaces/J8asLD4FVCFagK40xEr4/pages/10be5c03a17b9a78682a6326bc9a747caa32419b)
* [Restrict products or collections in Tag Library](/tag-library/how-to-create-secrets-products-collections.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.roadmap.so/tag-library/how-to-create-a-protected-page.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
