Create and Manage Sites for Development

Create and manage sites to test the storefronts you develop.

When you create a site in Business Manager, the site contains no content or business data such as, products, prices, or features. Add data and images as part of your customization.

  1. Select Administration > Sites > Manage Sites.

    Use the sort buttons to list your sites in the order that you want them to appear.

  2. Click New.

  3. On the New Site page, enter the following information:

    • ID - Name the site up to 32 alphanumeric characters. You can't use spaces or special characters, but you can use hyphen and underscore characters.

      Don’t use the same ID for a shared library and a site. Doing so can cause unexpected errors.

    • Currency - Select a default currency for the site. You can use multiple currencies for a single site, but only one currency is the default.

    • Taxation - Select Net or Gross. U.S. sites usually require Net. and EMEA/Asia sites usually require Gross.

    • Description - Enter a description for the site.

  4. Click Apply.

    The site is created with the General, Settings, Cache, and Security tabs active. The system also creates directories for storefront-specific data (for example, images) and a domain for the new store on the server database.

    To develop on this site, you must have access privileges.

The next step is to disable page caching for the site, so that you can immediately see changes made during development.

Disable page caching for your site, so that you can immediately see changes made during development. Typically, you disable page caching only for sandbox instances, never for development or production instances.

  1. Select Administration > Sites > Manage Sites > site > Cache.

    If you are developing a Business Manager extension instead of a new site, select Administration > Sites > Manage Sites > Business Manager > Cache .

  2. On the General tab of the Manage Sites page, for Instance Type, select Sandbox/Development.

  3. For Time to live (TTL) of static content, enter 0.

  4. Deselect Enable page caching.

  5. Click Apply.

If you are working with SFRA, you already have a catalog assigned to the site, so the next step is to generate a search index. If you are developing a custom site, the next step is to assign a catalog.

Assign a catalog for your site so that it has products and categories to display. Before creating your own site catalog, you can assign an existing catalog as a placeholder to get started.

  1. Select site > Merchant Tools > Products and Catalogs > Catalogs.

  2. Select edit on an existing catalog.

  3. Select Site Assignments and select your newly created site. Click Apply

  4. Select site > Merchant Tools > Site Preferences > Locales

  5. Enable locales for your site and set one as the default. Click Apply

In B2C Commerce Business Manager you can create stop words and synonyms, modify guided search ranking, view statistics, view index documents along with their indexed fields, and rebuild indexes. You can also manage the capabilities of full text search indexes.

The search index uses one index for each index type: Product, Spelling, Content, Synonym, and Suggest. This index contains all localized and non-localized data for all storefront locales.

Dependencies between indexes require that some indexes are built together.

You can run test queries on the product index.

  1. Select site > Merchant Tools > Search > Search Indexes.

  2. On the Search Indexes page, click the Language Options link to configure language specific stemming, and term completion and correction settings.

    If search isn’t required for the locale, you can exclude locales from the indexing process.

  3. On the Search Indexes page, if no full-text index has been built yet or you want to update an index, select one or more indexes using the checkboxes and click Rebuild.

    All index updates are performed asynchronously in the background for all locales. Old indexes remain operational until new indexes are ready.

    Progress information for the rebuild appears in the Status field.

  4. On the Search Indexes page, click the index type you want to manage, for example, click the Product Index.

    The Search Indexes details page that opens enables you to manage full-text search indexes that are used in your site to fulfill search requests. This table shows the tabs that appear for each index type:

    Index TypeTabs
    ProductGeneral, Sorting Attributes, Statistics, Documents
    SpellingGeneral, Statistics, Documents
    ContentGeneral, Sorting Attributes, Statistics, Documents
    SynonymGeneral, Statistics, Documents
    SuggestionGeneral, Statistics, Documents
    Active DataGeneral, Statistics, Documents
    AvailabilityGeneral, Statistics, Documents
  5. On the Search Indexes details page (Product Index page, for example), on the General tab, you can set the indexing mode for your storefront.

    Updates: Enable Scheduled Index Rebuild or Incremental Index Updates

    Indexing Mode: Select Compact - Production or Verbose - Development

  6. Click the Sorting Attributes tab (on the Product Index page) to add sorting attributes that are called directly from a pipeline.

    Only required for sorting attributes that aren’t used by the sorting rules feature.

  7. To view information about all indexed terms, click the Statistics tab. On this page you see:

    • Index summary: Number of indexed elements and the specific indexed fields.
    • Term frequency: By term and locale (for example, de_DE, default, en_US, and en_CA).
    • Dictionaries: By locale, where you can click Analyze Terms and then analyze terms by locale.
  8. To see indexing information for a specific product, click the Documents tab.

Disable a site to test the offline maintenance page, to perform offline maintenance, or discontinue a microsite created around an event or product line.

  1. Select Administration > Sites > Manage Sites.

  2. Click Site Name.

  3. On the General tab on the Manage Sites page, in the Status list, select Maintenance.

  4. Click Apply.

  5. To confirm that the site is disabled, click Storefront on the main menu.

    Only the offline maintenance page for the site appears.

Open the current site storefront in a new tab from within Business Manager.

  1. On the main menu, click Storefront.

    If a site is selected, the storefront opens.

  2. Select the desired site.

    The storefront opens.

You can provide a list of allowed hostnames to protect your site from certain host header attacks.

A B2C Commerce instance responds to a request only when the instance owner added the hostname to the allowlist. B2C Commerce-provided instance hostnames (your.instance.hostname.example.com) are always valid. You don’t have to add them to the allowlist explicitly.

This feature doesn't apply to hostnames in storefront sites.

  1. Select Administration > Sites > Manage Sites.

  2. On the Storefront - Sites page, click the Manage the Business Manager site.

  3. On the Sites-Site - Settings page, click the Hostnames tab.

    A list of allowed hostnames appears. B2C Commerce hostnames and configured hostname aliases are automatically included.

  4. Enter up to ten hostnames.

    If you want to access Business Manager with a customer-specific hostname (for example, staging.customer.com), add this hostname to the list of allowed hostnames. If you don't add the hostname, some Business Manager modules (for example, the Promotions or Coupons modules) display an error message.

If you are updating or maintaining a site in production, you can import the contents of the production instance into your sandbox.

Salesforce recommends that you use a subset of your data in your sandboxes as sandboxes don't provide equivalent machine resources as a production instance. If you use the full data set in a sandbox instance, you'll run into performance issues, including but not limited to, long running search indexing and higher CPU usage due to large amounts of garbage collection.

For information on importing data into your sandbox from a production instance, see Using Site Import/Export to Copy Instances.

Custom jobs created for the production instance are not run automatically on the sandbox, because doing so without checking or changing the job configuration can cause problems. Instead, custom jobs can still be run manually from within Business Manager.