> 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/lock-behavior/overview.md).

# Lock behavior overview

What a blocked visitor actually experiences, and the six behaviors you can configure on a lock.

Every lock in Sami B2B Lock, Password Protect is built from three pieces: **content to lock** (what's protected), **access rules** (who must match to get through), and **lock behavior** — this piece. Lock behavior is what a blocked visitor actually experiences on your storefront, and what happens once someone passes your rules.

{% hint style="info" %}
Not sure how these three pieces fit together? Start with [Locks overview](/b2b-lock-password-protect/locks/overview.md).
{% endhint %}

Where content-to-lock decides *what* is protected and access rules decide *who* gets in, lock behavior decides:

* What a blocked shopper sees in place of the protected price, button, page, or menu link.
* Whether the protected content is hidden from search engines, on-site search, and navigation menus.
* Where a visitor goes after they pass (or after they fail a specific rule).
* Whether passing a rule tags the customer's account.
* How long a visitor stays unlocked before they have to verify again.

These settings live on the **Unlock rules** tab of each lock's editor — the same screen where you add access rules, not a separate step afterward. Hide price and Add to cart, Hide from search engines, and Hide from menus configure in the **Blocked visitor behavior** panel in that tab's right-hand sidebar, and the exact fields shown there depend on the lock's content type. Redirect after access, Add customer tags on verification, and Grant access duration instead configure per access key/rule in that same tab's main column, alongside the rule builder.

## The six behaviors

| Behavior                       | What it controls                                                                              | Guide                                                                                                |
| ------------------------------ | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Hide price and Add to cart     | Hide a product or collection's price, Add to cart button, or both — or hide the item entirely | [Hide price and Add to cart](/b2b-lock-password-protect/lock-behavior/hide-price-and-add-to-cart.md) |
| Hide from search engines       | Remove protected content from on-site search, the sitemap, and search engine indexing         | [Hide from search engines](/b2b-lock-password-protect/lock-behavior/hide-from-search-engines.md)     |
| Hide from menus                | Remove a protected item's links from storefront navigation menus                              | [Hide from menus](/b2b-lock-password-protect/lock-behavior/hide-from-menus.md)                       |
| Redirect after access          | Send a visitor to a URL after they pass, or after a specific rule denies them                 | [Redirect after access](/b2b-lock-password-protect/lock-behavior/redirect-after-access.md)           |
| Add customer tags after access | Tag a signed-in customer's account after they satisfy an access key                           | [Add customer tags after access](/b2b-lock-password-protect/lock-behavior/customer-auto-tags.md)     |
| Grant access duration          | How long a visitor stays unlocked before re-verifying                                         | [Grant access duration](/b2b-lock-password-protect/lock-behavior/grant-access-duration.md)           |

## Related docs

* [Locks overview](/b2b-lock-password-protect/locks/overview.md)
* [Access rules overview](/b2b-lock-password-protect/access-rules/overview.md)
* [Manage locks](/b2b-lock-password-protect/locks/manage-locks.md)
* [Create your first lock](/b2b-lock-password-protect/quick-start/quickstart.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/lock-behavior/overview.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.
