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.
Storefront Next version 1.1 or later. See the storefront-next-template GitHub repository.
- In Business Manager, go to Merchant Tools > Your Site > Site Preferences > Hybrid Auth Settings.
- 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.
