> For the complete documentation index, see [llms.txt](https://docs-shpf.bsscommerce.com/bss-b2b-lock-login-password-hide-price/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-shpf.bsscommerce.com/bss-b2b-lock-login-password-hide-price/lock-core-concepts/goal-based-guides-i-want-to.../lock-your-entire-website-and-only-allow-b2b-wholesale-customers.md).

# Lock your entire website & only allow B2B/wholesale customers

**Goal**\
Make your store **fully private** so only **approved B2B/wholesale customers** can see any content.

**When to use this recipe**

* You run a **wholesale-only** business.
* You don’t want the public to browse your catalog or prices.
* You only sell to **approved customers** (e.g., tagged with `wholesale`).

***

#### Step 0 – Before you start

* Decide which customers are “approved” (usually via **tags** like `wholesale`, `b2b-approved`, `partner`).
* Make sure your B2B approval flow (e.g., registration form from B2B & Wholesale Solution) is set up to assign those tags.

***

#### Step 1 – Lock content

1. Go to **Apps → B2B Lock → Locks → Add lock**.
2. In **Step 1 – Lock content**:
   * Name: `Lock entire site for wholesale only`.
   * Target: **Entire website** (or equivalent “all storefront” option).

This tells B2B Lock to treat the whole store as gated content.

***

#### Step 2 – Control access

Let’s allow only **tagged wholesale customers**:

1. In **Step 2 – Control access**:
   * Add condition: **If the customer is tagged with `wholesale`** (or your chosen tag).
2. Optional:
   * Add **OR** conditions for internal tags (e.g., `staff`, `test`) if needed.

Everyone else (guests + non-wholesale customers) will see the lock message.

***

#### Step 3 – Advanced settings

Make the message clear and helpful:

* Headline: “Wholesale access only”.
* Body: “This store is available only for approved B2B customers. Please log in with your wholesale account or request access.”
* Add buttons/links:
  * **Login**
  * **Request wholesale account** (link to your B2B registration page)

Optionally, **exclude** public pages like `Contact` or `About` from this lock if you still want those visible.

Click **Save**.

***

#### Check your storefront

* As a **guest or non-tagged customer** → you should see the lock screen when visiting the homepage.
* As an **approved, tagged wholesale customer** → you should see and use the site normally after logging in.


---

# 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-shpf.bsscommerce.com/bss-b2b-lock-login-password-hide-price/lock-core-concepts/goal-based-guides-i-want-to.../lock-your-entire-website-and-only-allow-b2b-wholesale-customers.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.
