---
schema_version: "1"
id: a7c6e2bd4c3222f11427f5fa82a6d7c88097d62dedfb8cb263f8974a6734a5db
title: Maintain Shopper Sessions Across Subdomains in Storefront Next
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/sfnext/guides/sfnext-domain-cookie.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-domain-cookie.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 38ab46046c200c920cd76103b9ed68ea6d09f103827981ae02768896561af1fe
products:
  - Composable Storefront
  - Salesforce APIs
---
# Maintain Shopper Sessions Across Subdomains in Storefront Next

Configure a shared parent cookie domain to keep shoppers logged in with their baskets preserved when navigating between different subdomains. The domain-level cookie applies to storefronts that use multiple subdomains, such as `www.` and `shop.` on the `example.com` domain. It also applies to hybrid PWA Kit and SFRA storefronts that serve different paths under one parent domain. Without this configuration, shoppers lose their login status and shopping baskets when crossing subdomain boundaries. The loss of login status happens because browsers isolate cookies to individual hosts by default. Prevent frustration and abandoned carts by setting up domain-level cookies.

## Prerequisite

Storefront Next version 1.1 or later. See the [storefront-next-template](https://github.com/SalesforceCommerceCloud/storefront-next-template) GitHub repository.

## Configure a Shared Parent Cookie domain

1. In Business Manager, go to **Merchant Tools > _Your Site_ > Site Preferences > Hybrid Auth Settings**.
2. Under Site Settings, set the domain scope for hybrid auth cookies. To scope cookies to the current host only, enter 0 for the cookie domain level. To share cookies across across subdomains, set the level to 2.
   ![Hybrid auth cookie domain scope setting](https://developer.salesforce.com/docs/media/sfnext/sfnext-hybrid-cookie-domain.png)

## See Also

- [GitHub: Hybrid Cookie Domain Configuration](https://github.com/SalesforceCommerceCloud/storefront-next-template/tree/latest/docs/README-COOKIE-DOMAIN.md)
