# Lock With Passcodes

You can lock pages of products, collections & any CMS pages with passcodes.&#x20;

The passcode is a key created by the store merchant, using which customers can get access to a locked section of the website.

<mark style="color:blue;">**Step #1 - Passcode Title**</mark>

For the first step for all, give the passcode a title from this respective field.

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2F06tGJxHCpZ07nMonI7Mw%2FScreenshot_76.png?alt=media&#x26;token=61d39d3c-1e7a-40f0-82d7-7ae62c166c44" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**Step #2 - Select Restrict type**</mark>

Select the **Passcode** button, and enter the passcode that you want to set.

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2FgvgDnxlI8C9FMfONk2rt%2FScreenshot_77.png?alt=media&#x26;token=03fb8233-8991-426a-bcdc-01b3c301524f" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**Step #3 -**</mark>**&#x20;**<mark style="color:blue;">**Passcode Expiration Settings**</mark>

You can now **set expiration limits for passcodes**, giving you greater control over how long a passcode remains valid. This helps improve security and ensures access is granted only for the intended time period.

#### How it works

When passcode expiration is enabled, the passcode will automatically **stop working after the defined expiry**. The passcode input field may still appear on the storefront, but the expired code will no longer be accepted.

### Expiration options

#### 1. Expire on a specific date and time

Choose an exact **date and time** when the passcode should expire.\
This is ideal for:

* Limited-time access
* Event-based content
* Seasonal or promotional access

#### 2. Expire after a duration

Set a time duration (for example, **2 hours, 30 minutes**) after which the passcode expires automatically.\
This is useful for:

* Temporary access
* One-time or short-term usage
* Controlled entry periods

### Benefits

* Enhances security by preventing long-term passcode reuse
* Gives flexible access control based on time or date
* Reduces manual management of passcodes

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2FRvYK4U6Xeb1gx8Id0J1A%2FScreenshot_27.jpg?alt=media&#x26;token=81a6b71c-ac6f-4990-a4c8-09f8cd28892b" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**Step #4 - Customer Segments**</mark>

Select the options, whether you want to apply the set passcode to all the logged-in users or select customer tags only.

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2FjnTgV3nHGdqvMKnRiV3W%2FScreenshot_78.png?alt=media&#x26;token=5ce8146c-f0c1-4e92-b61d-a0f42d93514c" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**Step #5 - Lock Products**</mark>

Select the option on which you want to apply the set passcode will be **applied to all products** of your store.&#x20;

If you want to set the passcode for **specific products** only instead of all products, you can easily search for the products from this search bar and apply the passcode to it.

If you want to set the passcode for majority of your store products excluding a few products, then you can search for the products from the search bar and select the **is excluded** checkbox.&#x20;

With this selection, the set passcode will be applied to all the products <mark style="color:red;">**except**</mark> the products you have selected from the search bar.

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2F6W7K3NeRtyjndy7g72Rx%2FScreenshot_79.png?alt=media&#x26;token=2d868469-7394-4165-8d5d-315e02e7e3bd" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**Step #6 - Lock Collections**</mark>

Select the option on which you want to apply the set passcode, which will be **applied to all collections** of your store.&#x20;

If you want to set the passcode for **specific collections** only instead of all products, you can easily search for the collections from this search bar and apply the passcode to them.

If you want to set the passcode for the majority of your store products, excluding a few collections, then you can search for the collections from the search bar and select the **is excluded** checkbox.&#x20;

With this selection, the set passcode will be applied to all the collections <mark style="color:red;">**except**</mark> the products you have selected from the search bar.

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2FwP5ZJGBi5Djw15Q7ivi3%2FScreenshot_80.png?alt=media&#x26;token=b3a68932-39ae-49f8-ad48-c94afaa08983" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**Step #7 - Lock Pages**</mark>

Select the option on which you want to apply the set passcode, which will be **applied to all pages** of your store.&#x20;

If you want to set the passcode for **specific pages** only instead of all products, you can easily search for the pages from this search bar and apply the passcode to them.

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2Fh0yKEalwXdOP3NZAQmN4%2FScreenshot_81.png?alt=media&#x26;token=df0e62a6-329c-4c87-865d-02a15dbc9a62" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**Step #8 - Lock Countries**</mark>

Select the option on which you want to apply the set passcode, which will be **applied to all countries** of your store.&#x20;

If you want to set the passcode for **specific countries** only, instead of all products, you can easily search for the pages from this search bar and apply the passcode to them.

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2FdvvgtYsGGP79fQJYL8EC%2FScreenshot_82.png?alt=media&#x26;token=fa8456e4-e703-4d2f-a239-4c4f3f15eda2" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**Step #9 - Lock Website**</mark>

If you want to restrict the whole website, select the **whole website restricted** checkbox.

If you want to restrict specific websites, search for them from the search bar.

And, if you want to set the passcode for the majority of website excluding a few pages, then you can search for the websites from the search bar and select the **is excluded** checkbox.&#x20;

With this selection, the set passcode will be applied to all the websites <mark style="color:red;">**except**</mark> the website URLs you have selected from the search bar.

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2FcSrbNraOBDnjg6t2zFLb%2FScreenshot_83.png?alt=media&#x26;token=ffc84588-3d59-4cea-8322-5eae14cf084a" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**Step #10 - Date-Based Restriction**</mark>

<mark style="color:$primary;">**Restrict website by date range**</mark>

To restrict website access for a specific time period, enable the “**Restrict Website by Date Range**” option. The site will be accessible only via passcode during that period.

After that, choose the **start date** and **end date** for which you want to apply the restriction.

The selected websites will be restricted only to the specified date range and will automatically become accessible once the period ends.

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2FETjvMr529OMNZZuqsQun%2FScreenshot_84.png?alt=media&#x26;token=a2d6cd9c-b13c-4d33-9543-66d5b3970989" alt=""><figcaption></figcaption></figure>

<mark style="color:$primary;">**Repeat restrictions on specific days**</mark>

If you want to restrict website access on **specific days of the week**, enable the “**Repeat restrictions on specific days**” option.&#x20;

After that, choose the days on which you want the passcode to be active, such as Monday, Wednesday, or Sunday.

The selected pages or products will be restricted only on the chosen days, giving you flexible and controlled access.

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2Fneu4F7tWq0mJlDyEjEAT%2FScreenshot_94.png?alt=media&#x26;token=430f925a-8a6f-418f-af79-db3874b59f55" alt=""><figcaption></figcaption></figure>

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2FMTzzT2PVBGv6LQGFlubF%2FScreenshot_95.png?alt=media&#x26;token=38a4abf5-d3f7-40d5-ad6a-b7104bac37af" alt=""><figcaption></figcaption></figure>

### Enhanced Passcode Preview with Real-Life Scenario

We’ve improved the **Passcode section** by replacing the basic passcode preview with a **real-life textual scenario**.

Instead of showing only static passcode details, the preview now explains **how the passcode behaves in real store conditions,** including who can access the page, what restricted users will see, and how customer tags or segments affect access.

#### How it works

As you configure the passcode settings (such as restriction type, customer tags, or locked products), the preview updates instantly to reflect:

* Whether a passcode is required or not
* Which customers are allowed access
* What message will unauthorized users see
* Which products or pages are restricted

This enhancement provides better clarity and confidence when setting up passcode-based access control.

<figure><img src="https://922942541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIGRcMuVZCEGNibOl1OmW%2Fuploads%2FyeCptuqcTkEz3ZiOQ8SY%2FScreenshot_26.jpg?alt=media&#x26;token=922798b8-c738-4841-aaaa-9765d0cc2b7b" alt=""><figcaption></figcaption></figure>
