> For the complete documentation index, see [llms.txt](https://docs.samita.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samita.io/b2b-lock-password-protect/content-to-lock/whole-website.md).

# Whole website

Lock your entire storefront behind access rules, with an option to still allow the home page.

The **Whole Website** content type locks every page of your storefront behind the access rules you set, with one exception you control: whether the home page stays open. This is the right choice when you're building a store that should be invite-only, wholesale-only, or gated behind a single login screen across the board.

## Create the lock

1. Open **Locks** in the app's navigation.
2. Click **Create lock**.
3. Give the lock a clear, descriptive name — you'll see this name in the Locks list, so make it something you'll recognize later (for example, "Whole store login required").

## Choose Whole Website as the content to lock

4. On the **Lock setup** tab, in the content picker, select **Whole Website**.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-bad3f1115141841bc69d24389c49c3e478ddb1ef%2Fscreenshot-locks-content-picker-whole-website.png?alt=media" alt="The content picker with Whole Website selected as the content type to lock."><figcaption><p>Select Whole Website in the content picker to protect your entire storefront.</p></figcaption></figure>

5. Optionally tick **Exclude url** and list any paths that should stay public even though the rest of the site is locked — a contact page or a landing page you're running ads to, for example.

{% hint style="info" %}
**Exclude url** is specific to the Whole Website content type. It's the only content type with a URL-level carve-out, which is what makes "lock everything except a few pages" possible in a single lock.
{% endhint %}

{% hint style="warning" %}
Whole Website locks may require a paid plan depending on your current plan.
{% endhint %}

6. Click the **Unlock rules** tab to continue.

## Add an access rule

7. Add at least one rule that decides who gets through. For a whole-site lock, **Logged-in customers** or **Passcode** are common starting points — for example, requiring every visitor to sign in with a customer account before browsing anything.
8. Configure the rule's specific settings (see [Access rules overview](/b2b-lock-password-protect/access-rules/overview.md) for the full catalogue of available rules).
9. If you need more than one condition to be true at once, add every required rule to the access key. All configured conditions must be satisfied. See [Combining rules](/b2b-lock-password-protect/access-rules/combining-rules.md) for details.

## Choose a lock behavior

On the same **Unlock rules** tab, the right-hand sidebar has a **Blocked visitor behavior** panel. For a Whole Website lock, that panel has a single field:

10. Turn on **Allow access to the home page** if you want visitors to still be able to browse your storefront's home page without meeting any access rule — useful if you want the home page to work as a public landing page while everything else stays locked. Leave it off to lock the home page along with the rest of the site.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-3482a77c5ba6b326b2c31018b1d7aaaf936882a6%2Fscreenshot-locks-whole-website-allow-home-page.png?alt=media" alt="The Allow access to the home page toggle for a Whole Website lock."><figcaption><p>Turn on Allow access to the home page to keep your home page public while locking the rest of the site.</p></figcaption></figure>

11. Decide what else blocked visitors see and what happens once they pass — for a whole-site lock this is usually a full lock screen rather than a hidden price or button. Review [Lock behavior overview](/b2b-lock-password-protect/lock-behavior/overview.md) for the available options, such as redirecting visitors after they gain access or tagging their customer account once verified.

## Save

12. Click **Save**. Once the app embed is enabled in your theme, the lock takes effect on your storefront immediately.

{% hint style="success" %}
Your whole storefront is now protected by the rules you configured, with the home page handled according to the toggle you set.
{% endhint %}

## Related docs

* [Access rules overview](/b2b-lock-password-protect/access-rules/overview.md)
* [Lock behavior overview](/b2b-lock-password-protect/lock-behavior/overview.md)
* [Manage locks](/b2b-lock-password-protect/locks/manage-locks.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.samita.io/b2b-lock-password-protect/content-to-lock/whole-website.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.
