> For the complete documentation index, see [llms.txt](https://www.locksmith.guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.locksmith.guide/tutorials/more/locking-the-home-page.md).

# Locking the home page

How to create a lock that covers the home page of your Online Store sales channel in Shopify

## Option 1 - locking your entire store

Locksmith gives you the ability to lock your entire store, which you can select when creating a new lock:

<figure><img src="https://277214568-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUeGWHuijBPr8Og1Gta%2Fuploads%2FNWavs8I7I7P4GGkhpwoz%2FScreenshot%202024-03-21%20at%2011.31.17.png?alt=media&amp;token=6c4160f2-879b-4bb8-878d-b1f185155470" alt=""><figcaption></figcaption></figure>

Once the lock for your entire store is created, you'll see an option labelled *"*&#x41;llow access to the home page"**. It is unchecked by default** - **leave it that way to ensure that the home page is locked.**

<figure><img src="https://277214568-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUeGWHuijBPr8Og1Gta%2Fuploads%2FVJNnQf3WIAoK7owRbu9v%2FScreenshot%202024-03-21%20at%2011.34.34.png?alt=media&amp;token=c6031ce7-f9b5-4ca9-adb1-b6b3d5b606d5" alt=""><figcaption></figcaption></figure>

## Option 2 - create a lock that ONLY covers the home page

This can be done using a simple custom lock. Choose "Start a Liquid lock" from the list when creating a new lock:

<figure><img src="https://277214568-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUeGWHuijBPr8Og1Gta%2Fuploads%2FHm4bV1p4Hl8tJiMdtXCH%2FScreenshot%202024-03-21%20at%2011.39.52.png?alt=media&amp;token=916b89a5-84b8-427f-aeab-b2493dd6c8f1" alt=""><figcaption></figcaption></figure>

For the "Liquid condition", use `template == "index"`

<figure><img src="https://277214568-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUeGWHuijBPr8Og1Gta%2Fuploads%2FYOfwH3CM3pgQ2peFeX7e%2FScreenshot%202024-03-21%20at%2011.41.36.png?alt=media&amp;token=51709f96-48a0-44da-ad43-dd7531544d98" alt=""><figcaption></figcaption></figure>

Press "Create lock" to finish the lock creation. Make sure to add your keys on the following page like normal.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.locksmith.guide/tutorials/more/locking-the-home-page.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
