Allow customers access to some pages while disallow access to other pages

Topic summary

A user wants to allow customers to access specific pages (landing page, product page, cart, checkout) while showing a “Coming Soon” message on other pages like Q&A sections.

Initial Approach:

  • User attempted adding JavaScript code to theme.liquid to redirect based on URL paths
  • This method has limitations: doesn’t work with JavaScript disabled, content remains visible until redirect executes, and doesn’t prevent non-logged-in customers from viewing content

Recommended Solutions:

  • Customer tags & apps: Use access control/membership apps like Locksmith for more robust content gating
  • Meta-refresh redirects: Preferred over JavaScript redirects as a server-level solution
  • Unpublishing resources: Don’t publish pages/collections/products to the online sales channel that aren’t ready; only link to available pages in menus

Use Case Context:
The user is building a store under time constraints where customers will access a product via QR code on a sample, leading to a landing page. They need a simple way to restrict access to incomplete pages without complex customer status logic.

Server-level redirects (301s) were discussed but noted as unsuitable since they’re meant for permanent URL changes, not conditional access control.

Summarized with AI on November 12. AI used: claude-sonnet-4-5-20250929.

Those are server level redirects, 301’s, meant for permanent page moves and changes in url structure.

There will be no logic you can apply to let someone see the initial urls content before the redirect.