---
schema_version: "1"
id: 004891633a453d3072a549281775c408084dc00f4fb13106aed5b24a9c4ef0af
title: Multiple Sites
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/pwa-kit-managed-runtime/guides/multiple-sites.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/multiple-sites.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 55984ad0f0f652e3eaff1b0162823a29968a68e5dbe2101bc119de2c3672d16e
products:
  - Composable Storefront
  - Salesforce APIs
---
# Multiple Sites

When a PWA Kit project is created with the Retail React App template, it is configured by default for a single locale and a single site. However, it can be extended to run multiple sites with a single code base.

## Site Configuration

The `config/sites.js` file contains a definition of the sites that you configured in Business Manager. The following example shows the configuration for the `RefArch` and `RefArchGlobal` sites:

```javascript
// /config/sites.js

module.exports = [
  {
    id: "RefArch",
    l10n: {
      supportedCurrencies: ["USD"],
      defaultCurrency: "USD",
      defaultLocale: "en-US",
      supportedLocales: [
        {
          id: "en-US",
          alias: "us",
          preferredCurrency: "USD",
        },
        {
          id: "en-CA",
          preferredCurrency: "USD",
        },
      ],
    },
  },
  {
    id: "RefArchGlobal",
    l10n: {
      supportedCurrencies: ["GBP", "EUR", "JPY"],
      defaultCurrency: "GBP",
      supportedLocales: [
        {
          id: "de-DE",
          alias: "de",
          preferredCurrency: "EUR",
        },
        {
          id: "en-GB",
          preferredCurrency: "GBP",
        },
        {
          id: "ja-JP",
          preferredCurrency: "JPY",
        },
      ],
      defaultLocale: "en-GB",
    },
  },
];
```

## Default Site and Aliases

In the `/config/default.js` file, you can set the default site and optionally, map the site IDs with aliases. If no alias is defined for the site, then IDs are used in URLs. The following example sets the default site to `RefArchGlobal` and defines three aliases for it.

```javascript
// /config/default.js

defaultSite: 'RefArchGlobal',
siteAliases: {
    RefArch: 'us',
    RefArchGlobal: 'global',
    NTOManaged: 'nto'
},
```

If you set `url.showDefault` to `true` in the `/config/default.js` file, the default locale and site are displayed in your application URLs. In addition to the site alias, you can also configure aliases for your locale in the `sites.js` file. If you configured an alias for a locale, the URL displays the alias instead of your locale ID.

**note:** Application URLs are constructed using canonical site and locale IDs and are still valid URLs even when aliases are used.

## Deployment for Multiple Domains

With environment-specific configuration files, you can manage multiple B2C sites defined in Business Manager and deploy them over different domains using multiple Managed Runtime environments.

For example, your site can be accessed from `customer.ca` and `customer.uk`, or `customer-a.com` and `customer-b.ca`. You can also customize the URL patterns further. For example, your URLs can be formatted as `customer-1.com/us` or `customer-2.com/?locale=en_US`.

You can deploy bundles to work with multiple domains using different Managed Runtime environments, each configured for a separate domain. The configuration mapping is done by creating a separate configuration file for each Managed Runtime environment.

For example, to deploy `customer-1.com` to the `env-customer-1` environment, and `customer-2.com` to the `env-customer-2` environment, you need to create the following files in place of `config/default.js`:

- `config/env-customer-1.js`
- `config/env-customer-2.js`

For more information on environment-specific configurations, see the [Configuration Files](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/configuration-options.md) guide.

## See Also

- [Localization](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-localization.html)
- [Translations](https://github.com/SalesforceCommerceCloud/pwa-kit/blob/develop/packages/template-retail-react-app/translations/README.md#translations)
