---
schema_version: "1"
id: 1da4ac6a130c000198b79a33d2dce27b7a3f7eba5539003d6fe114a0f67caf09
title: Route Requests to a Single MRT Environment with Environment Base Paths
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/sfnext/guides/sfnext-base-path.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-base-path.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 875075f201db072fa8f56e303f82eea3b7b5c5749e97397fd75d80fa6d8295de
products:
  - Composable Storefront
  - Salesforce APIs
---
# Route Requests to a Single MRT Environment with Environment Base Paths

Consider environment base paths when planning your storefront project with multiple Managed Runtime (MRT) environments and a single domain. To route requests to the correct MRT environment via eCDN, set up environment base paths for each MRT environment. Also, use an environment base path to host the storefront within a specific subpath of a website.

This example diagram shows that two base paths are set up for the `www.example.com` domain. Each base path points to a distinct MRT environment.

![Example of a storefront with two base paths and two MRT environments](https://developer.salesforce.com/docs/media/sfnext/sfnext-base-path-diag-example.com.png '{"class": "image-xl"}')

An organization with a single domain can host multiple storefronts for various uses. One example is offering a storefront for each locale. For example, Northern Trail Outfitters (NTO) has multiple locations and has multiple storefront URLs for each region. `www.northerntrailoutfitters.com/us/retail` is for the US region and `www.northerntrailoutfitters.com/ca/retail` is for the Canadian region. Set up two base paths: `us` and `ca`. Both URLs use the same domain, `www.northerntrailoutfitters.com`, but the base paths map them to distinct MRT environments.

**note:** If a storefront provides all locales within a single MRT environment, use multisite instead of base paths. See [Configure Multisite URLs](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-multi-site.md).

Another example is a website that hosts the storefront only in a subpath. For example, `www.example.com` is the main site with pages showing content. It contains one storefront that's available under a specific path: `www.example.com/shop`. This path corresponds to an environment base path of `/shop`. The base path points to an MRT environment.

## Configure Base Paths

Configure base paths in `config.server.ts` under `runtime.ssrParameters.envBasePath`:

```typescript
// config.server.ts
export default {
  runtime: {
    ssrParameters: {
      ssrFunctionNodeVersion: "24.x",
      envBasePath: "/storefront-a",
    },
  },
  app: {
    /* ... */
  },
};
```

## See Also

- [Managed Runtime Overview](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-mrt-overview.md)
- [MRT Environment Variables](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-mrt-environment-vars.md)
