Restricting Store Access to B2B Customers Only
The B2B-only store access setting gives wholesale merchants full control over who can browse their storefront. When enabled, only logged-in B2B customers with an approved company account can access your store — unregistered visitors and non-B2B shoppers are automatically redirected away.
This guide explains how to enable B2B-only store access, what your customers see based on their account status, and key behaviors to be aware of.
Prerequisites for Enabling B2B-Only Store Access
Before enabling B2B-only store access:
- B2B features must be active on your store (requires SHOPLINE Enterprise plan). For more information, refer to "Getting Started with Your B2B Sales."
- Your B2B customers must have accounts linked to at least one company location. Customers without a linked company location cannot access the store even after logging in. See "Creating and Managing B2B Company Profiles" for instructions on linking customers to company locations.
Enabling B2B-Only Store Access
To turn on B2B-only store access:
- From your SHOPLINE admin, go to Online Store > Preferences.
-
In the Password protection section, turn on the Restrict access to B2B customers toggle.
- Click Update.
Once saved, all storefront pages are immediately restricted to B2B customers.
| Note: If you have both Restrict access to B2B customers and Password Protection enabled at the same time, visitors are prompted to enter the store password first — the B2B login check happens after. |
How B2B-Only Store Access Affects Different Visitors
When B2B-only store access is enabled, what a visitor sees depends on how they are logged in:
Visitors Not Logged In Through a Customer Account
Anyone who is not logged in — or who is only logged in using the classic customer account — is redirected to the new customer account login page. This includes first-time visitors and B2B customers who accidentally used the old sign-in link.
| Note: Make sure your B2B customers use the new customer account sign-in link (/account/signIn). Classic account sessions do not grant B2B store access, even if the underlying account is a valid B2B account. For more information about the differences between customer account types, see "Understanding Classic and New Customer Accounts." |
B2B Customers Logged In with an Approved Company Account
Customers signed in via the new customer account who are linked to a company location can browse the store normally. Customers linked to multiple locations are prompted to select a location first. Customers with only one location are taken directly to the store.
Customers Logged In Without a Linked Company Location
If a customer is signed in but has no linked company location, they see an access-denied page with the message: “This account wasn't registered as a business account (B2B).” They can click Login a new account to log out and sign in with a different account.
| Note: All pages under /account/ — including sign-up, login, password reset, order history, and account settings — are always accessible and are NOT blocked by this setting. This ensures customers can always log in, register, and manage their accounts. |
Important Notes for B2B-Only Store Access
- Admin and editor panels are not affected: Your team can continue accessing the theme editor and checkout editor in the admin panel without any B2B login checks.
- Customers with multiple company locations: Logged-in customers associated with more than one company location who have not yet selected one are redirected to the location selection page. Customers associated with only one location access the store directly.
FAQs About B2B-Only Store Access
Q1: Can a DTC (retail) customer still register on my store?
Yes. Registration pages are exempt from the B2B-only restriction, so DTC customers can still create accounts. However, after logging in they will see the access-denied page if they are not linked to a company location.
Q2: What if my B2B customer tries to log in with a classic account?
They will be redirected to the new customer account login page. Classic account sessions are not recognized by the B2B-only access check. Ask your B2B customers to use the new customer account sign-in link (/account/signIn).
Q3: Is my store completely inaccessible to everyone except B2B customers?
Yes — all standard storefront pages, including the homepage, product pages, cart, and checkout, are blocked for non-B2B visitors. Only account-related pages (/account/...) remain accessible so customers can still log in and manage their accounts.