Loading

Salesforce Sites: Custom Domain CNAME Redirection Without 'www' in the URL

Data pubblicazione: May 22, 2026
Descrizione

When a Salesforce Site (Force.com Sites) is configured with a custom domain, a CNAME record is typically created for the subdomain that includes www (for example, www.example.com). However, users who navigate to the root or "naked" domain — the domain without www (for example, example.com) — may find that the URL does not resolve correctly. Instead of loading the Salesforce Site, the naked domain redirects users to the Salesforce login page (e.g., `<REDACTED>).


This behavior occurs because most DNS registrars and the CNAME protocol do not natively support CNAME records for root (naked) domains. A separate DNS configuration is required to handle naked domain requests.


Note: The information in this article applies to non-secure (HTTP) domains only. For HTTPS custom domains, refer to the Naked Domains documentation.

Risoluzione

Option 1: Create a Separate CNAME Record for the Naked Domain

Some DNS registrars support a separate CNAME or ALIAS record for the root domain (without www). If your registrar supports this, create an additional CNAME or ALIAS record pointing the naked domain (e.g., example.com) to the same Salesforce Sites CNAME target as the www subdomain. Contact your DNS registrar to confirm support for this configuration. read our Documentation about Naked Domains.

Option 2: Use a DNS Forwarder or a Second Force.com Site

If your DNS registrar does not support CNAME records for naked domains:

  • Configure a DNS forwarder at your registrar to automatically redirect all requests to the naked domain (e.g., example.com) to the www subdomain (e.g., www.example.com).

 Alternatively, create a second Force.com Site that uses the same pages as the primary site, or that simply redirects incoming requests from the naked domain to the correct www URL.

  1. Best Practice: Sites and record identifiers
  2. Setting up Salesforce Sites
  3. Add a Domain
Numero articolo Knowledge

000385794

 
Caricamento
Salesforce Help | Article