Loading

Configure root domains with the B2C Commerce platform's eCDN

Дата публикации: May 7, 2025
Описание

This article provides alternative solutions on how to handle APEX/Root domain configuration with the B2C Commerce platform's embedded Content Delivery Network (eCDN).

Решение

NOTE:

  • Root/APEX aliasing is not supported on eCDN
  • TXT verification may not be completed via eCDN
  • Please set this up externally with your DNS provider / redirect service and forward both HTTP/HTTPS traffic to your custom hostname. 


All Content Delivery Networks (CDNs) provide CNAME records as a part of DNS setup because CDNs can't have static IPs to point to multiple nodes in a distributed network. 

For example, the following is NOT recommended as it will not work long term:
mysite.com      A      104.28.26.118   

Note: In the above scenario, 104.28.26.118 is the IP address of a Cloudflare node.

How will I handle my APEX/Root domains from now on?

Problem: 
Due to limitations in DNS specification, Apex/Root domains (example.com) cannot carry a CNAME record to point to an alias hostname. A CNAME record is not allowed to coexist with any other data. For example, if suzy.example.com is an alias for sue.example.com, you cannot also have an MX record for suzy.example.edu, an A record or even a TXT record.

Workaround:
Use an external service to redirect from the Apex/Root domain to the sub-domain. This redirect should be set up for HTTP and HTTPS. For example:

  • http://example.com redirects to http://www.example.com
  • https://example.com redirects to https://www.example.com

Depending on your needs, you can also set up a HTTP to HTTPS redirection e.g. http://example.com redirects to https://www.example.com

The www.example.com will remain CNAME’d to eCDN.

External Redirect could be any of the following:
a. DNS provider handling the redirect.
b. Use a 3rd party Proxy Server, e.g. stacked CDN on top of eCDN.
c. Using IIS on a Microsoft Windows Server
d. If you’re using NGINX, you can rewrite rules via that channel.
e. Using Apache as a web server, you can do it via .htaccess.


What can I do if I don't want to redirect my APEX/Root domain to a subdomain?

Issue:

You intend to permanently serve traffic from the apex (example.com) instead of redirecting to subdomain (i.e. www.example.com).

Workaround:
Use a DNS-level solution to direct apex/root domains to eCDN CNAME alias. Known providers who support include UltraDNS, DynDNS, DNSMadeEasy, DNSimple, CSC Advanced DNS, NS1, etc..

 

What can I do if I want to migrate to a proxy zone?

Issue: 
What steps need to be taken in order to move to a proxy zone as outlined in Migrate a Legacy Zone to a Proxy Zone

Answer:

  1.  For redirecting traffic from root domain, add a redirect in your DNS provider / redirect service to the proxy zone's CNAME record.

 

Номер статьи базы знаний

000391603

 
Загрузка
Salesforce Help | Article