Store URL & Handle

Configure the RedERP ecommerce shop handle, public subdomain URLs, and one-store-per-account rules.

Overview

Each ERP account has one ecommerce store and one public handle (store_domain). The storefront is served on a subdomain, not a path under the ERP app.


URL patterns

EnvironmentPatternExample
Productionhttps://{handle}.rederp.shophttps://dailydose.rederp.shop
Localhttp://{handle}.localhost:3060http://dailydose.localhost:3060

Plain localhost without a subdomain can use the backend env fallback ECOMMERCE_DEV_STORE_HANDLE.


Set or change the handle (step by step)

  1. Open E-commerce → Store settings → General.
  2. Enter Shop handle (stored as store_domain).
  3. Click Save at the top.
  4. Copy the preview URL / open View storefront only after Save.

Unsaved handle changes do not update the live URLs shown in the preview.


Handle rules

  • Length 3–50 characters
  • Lowercase letters, numbers, hyphens: ^[a-z0-9]+(?:-[a-z0-9]+)*$
  • Not reserved (www, api, admin, …)
  • Must be globally unique

Errors you may see

MessageMeaning
store_domain is already takenAnother account owns that handle
store_domain format is invalidBad characters / pattern
store_domain is reservedSystem-reserved slug
Store not foundHandle missing, wrong, or store not resolvable

How the storefront finds your shop

Resolution order:

  1. Header x-shop-handle
  2. Query shop_handle / handle
  3. Host subdomain ({handle}.…)
  4. Dev fallback env on plain localhost

Trainers: always open the shop via the handle subdomain, not a random host.


One account = one store

There is a single ecommerce settings row per account_id. You cannot run multiple public handles for the same account. Need a second brand? Use a second RedERP account (or a future multi-store feature if product adds it).


Store URL & Handle - RedERP User Guide