Uredi

Deli z drugimi prek


Add support for a content delivery network (CDN)

This article describes how to add a content delivery network (CDN) to your Microsoft Dynamics 365 Commerce environment.

When you set up an e-commerce environment in Dynamics 365 Commerce, you can configure it to work with your CDN service.

Your custom domain can be enabled during the provisioning process for your e-commerce environment. Alternatively, you can use a service request to set it up after the provisioning process is completed. The provisioning process for the e-commerce environment generates a host name that is associated with the environment. This host name has the following format, where <e-commerce-tenant-name> is the name of your environment:

<e-commerce-tenant-name>.commerce.dynamics.com

The host name or endpoint that is generated during the provisioning process supports a Secure Sockets Layer (SSL) certificate only for *.commerce.dynamics.com. It doesn't support SSL for custom domains. Therefore, you must terminate SSL for custom domains in your CDN and forward traffic from the CDN to the host name or endpoint that Commerce generated.

Additionally, the statics (JavaScript or Cascading Style Sheets [CSS] files) from Commerce are served from the endpoint that Commerce generated (*.commerce.dynamics.com). The statics can be cached only if the host name or endpoint that Commerce generated is put behind the CDN.

Set up SSL

After you provision your Commerce environment with the custom domain that is provided, or after you provide the custom domain for your environment by using a service request, you need to work with the Commerce onboarding team to plan the DNS changes.

As was previously mentioned, the generated host name or endpoint supports an SSL certificate only for *.commerce.dynamics.com. It doesn't support SSL for custom domains.

CDN services

Any CDN service can be used with a Commerce environment. Here are two examples:

CDN setup

The CDN setup process consists of these general steps:

  1. Add a front-end host.
  2. Configure a backend pool.
  3. Set up rules for routing.

Add a front-end host

Any CDN service can be used, but for the example in this article, Azure Front Door Service is used.

For information about how to set up Azure Front Door Service, see Quickstart: Create a Front Door for a highly available global web application.

Configure a backend pool in Azure Front Door Service

To configure a backend pool in Azure Front Door Service, follow these steps.

  1. Add <ecom-tenant-name>.commerce.dynamics.com to a backend pool as a custom host that has a backend host header that is the same as <ecom-tenant-name>.commerce.dynamics.com.
  2. Under Load balancing, leave the default values.
  3. Disable health checks for the backend pool.

The following illustration shows the Add a backend dialog box in Azure Front Door Service with the backend host name entered.

Add a backend pool dialog box.

The following illustration shows the Add a backend pool dialog box in Azure Front Door Service with the default load balancing values.

Add a backend pool dialog box continued.

Note

Be sure to disable Health Probes when setting up your own Azure Front Door service for Commerce.

Set up rules in Azure Front Door Service

To set up a routing rule in Azure Front Door Service, follow these steps.

  1. Add a routing rule.
  2. In the Name field, enter default.
  3. In the Accepted protocol field, select HTTP and HTTPS.
  4. In the Frontend hosts field, enter dynamics-ecom-tenant-name.azurefd.net.
  5. Under Patterns to match, in the upper field, enter /*.
  6. Under Route Details, set the Route type option to Forward.
  7. In the Backend pool field, select ecom-backend.
  8. In the Forwarding protocol field group, select the Match request option.
  9. Set the URL rewrite option to Disabled.
  10. Set the Caching option to Disabled.

Warning

If the domain that you will use is already active and live, create a support ticket from the Support tile in Microsoft Dynamics Lifecycle Services to get assistance for your next steps. For more information, see Get support for finance and operations apps or Lifecycle Services (LCS).

If your domain is new and is not a pre-existing live domain, you can add your custom domain to the configuration for Azure Front Door Service. This will enable web traffic to direct to your site via the Azure Front Door instance. To add the custom domain (for example, www.fabrikam.com), you must configure a Canonical Name (CNAME) for the domain.

The following illustration shows the CNAME configuration dialog box in Azure Front Door Service.

CNAME Configuration dialog box.

You can use Azure Front Door Service to manage the certificate, or you can use your own certificate for the custom domain.

The following illustration shows the Custom Domain HTTPS dialog box in Azure Front Door Service.

Custom Domain HTTPS dialog box.

For detailed instructions on adding a custom domain to your Azure Front Door, see Add a custom domain to your Front Door.

Your CDN should now be correctly configured so that it can be used with your Commerce site.

Additional resources

Content delivery network implementation options