Use this routing matrix to choose a hybrid storefront split between PWA Kit (Composable Storefront) and SFRA/SiteGenesis.
PWA Kit hybrid routing has two complementary parts:
eCDN routing rules — a Cloudflare rule expression that routes matching paths to your Managed Runtime (MRT) environment. Everything else stays on SFRA/SiteGenesis.
app/routes.jsx filtering — remove the SFRA/SiteGenesis-owned routes from your PWA Kit route table so that React Router forces a full-page navigation (instead of a soft, client-side navigation) to those paths.
Keep the two definitions complementary: any path routed to MRT by eCDN should remain in app/routes.jsx, and any path owned by SFRA/SiteGenesis should be removed from app/routes.jsx.
Use the same Cloudflare expression pattern in every environment, but apply it differently:
PIG and ODS (eCDN): Paste the rule expression into Rule expression in the Business Manager eCDN UI, or pass it to the createMrtRules API. When you use the API, also scope the expression to your hostname with http.host. For the setup steps, see CDN Routing Rules for Hybrid Implementations.
eCDN MRT rule expression: A single Cloudflare expression evaluated at the edge. Requests whose path matches the expression are routed to Managed Runtime (PWA Kit); all other requests go to SFRA/SiteGenesis.
app/routes.jsx: The PWA Kit client-side route table. Remove SFRA/SiteGenesis-owned routes so PWA Kit hard-navigates to them. For projects that use template extensibility, override overrides/app/routes.jsx.
The route patterns below use the default Retail React App routes (/, /category/:categoryId, /product/:productId, /search, /account, /login, /registration, /reset-password, /cart, /checkout). Adjust them to match your project’s routes.
Matrix Configurations
Each configuration lists the eCDN rule expression (paths routed to PWA Kit on MRT) and the routes to remove from app/routes.jsx (paths owned by SFRA/SiteGenesis).
Matrix-01: Modern Core (Home, PDP, PLP on PWA Kit)
Strategy: The discovery funnel, search, account, and authentication routes run on PWA Kit. Only checkout (/cart and /checkout) stays on SFRA/SiteGenesis.
eCDN rule expression:
1(http.request.uri.path matches "^/$" or http.request.uri.path matches "^/category.*" or http.request.uri.path matches "^/product.*" or http.request.uri.path matches "^/search.*" or http.request.uri.path matches "^/account.*" or http.request.uri.path matches "^/login.*" or http.request.uri.path matches "^/registration.*" or http.request.uri.path matches "^/reset-password.*" or http.request.uri.path matches "^/mobify.*" or http.request.uri.path matches "^/callback.*" or http.request.uri.path matches "^/worker\.js.*")
Remove from app/routes.jsx:/cart, /checkout
Matrix-02: Modern Checkout (Cart and Checkout on PWA Kit)
Strategy: Test or roll out a PWA Kit checkout while keeping browse and discovery routes on SFRA/SiteGenesis.
eCDN rule expression:
1(http.request.uri.path matches "^/cart.*" or http.request.uri.path matches "^/checkout.*" or http.request.uri.path matches "^/mobify.*" or http.request.uri.path matches "^/callback.*" or http.request.uri.path matches "^/worker\.js.*")
Remove from app/routes.jsx:/, /category/:categoryId, /product/:productId, /search, /account, /login, /registration, /reset-password
Matrix-03: Modern Entry Only (Home on PWA Kit)
Strategy: An early pilot where only the home page is modernized and deeper flows remain on SFRA/SiteGenesis.
eCDN rule expression:
1(http.request.uri.path matches "^/$" or http.request.uri.path matches "^/mobify.*" or http.request.uri.path matches "^/callback.*" or http.request.uri.path matches "^/worker\.js.*")
Strategy: The home page stays on SFRA/SiteGenesis, while deeper browse and transactional routes move to PWA Kit.
eCDN rule expression:
1(http.request.uri.path matches "^/category.*" or http.request.uri.path matches "^/product.*" or http.request.uri.path matches "^/search.*" or http.request.uri.path matches "^/account.*" or http.request.uri.path matches "^/login.*" or http.request.uri.path matches "^/registration.*" or http.request.uri.path matches "^/reset-password.*" or http.request.uri.path matches "^/cart.*" or http.request.uri.path matches "^/checkout.*" or http.request.uri.path matches "^/mobify.*" or http.request.uri.path matches "^/callback.*" or http.request.uri.path matches "^/worker\.js.*")
Remove from app/routes.jsx:/
Matrix-05: Catalog-Only Migration (PLP/PDP on PWA Kit)
Strategy: Move high-volume catalog routes (category, product, search) to PWA Kit while preserving legacy account and checkout routes.
eCDN rule expression:
1(http.request.uri.path matches "^/category.*" or http.request.uri.path matches "^/product.*" or http.request.uri.path matches "^/search.*" or http.request.uri.path matches "^/mobify.*" or http.request.uri.path matches "^/callback.*" or http.request.uri.path matches "^/worker\.js.*")
Remove from app/routes.jsx:/, /account, /login, /registration, /reset-password, /cart, /checkout
Matrix-06: Account and Auth Only (Identity Flows on PWA Kit)
Strategy: Move account and authentication experiences to PWA Kit while leaving catalog and checkout on SFRA/SiteGenesis.
eCDN rule expression:
1(http.request.uri.path matches "^/account.*" or http.request.uri.path matches "^/login.*" or http.request.uri.path matches "^/registration.*" or http.request.uri.path matches "^/reset-password.*" or http.request.uri.path matches "^/mobify.*" or http.request.uri.path matches "^/callback.*" or http.request.uri.path matches "^/worker\.js.*")
Remove from app/routes.jsx:/, /category/:categoryId, /product/:productId, /search, /cart, /checkout
Global Framework Requirements
Keep these route clauses routed to Managed Runtime in every matrix configuration. PWA Kit’s server-side rendering system relies on them:
^/mobify.* for PWA Kit internal proxies and static assets.
^/callback.* for the SLAS authentication callback.
^/worker\.js.* for the PWA Kit service worker.
For the catch-all route, update the PWA /* route in app/routes.jsx to redirect to the default origin instead of rendering <PageNotFound />. For the full procedure, see Configure a Hybrid Storefront with Hybrid Auth (PWA Kit).