+ Start a Discussion
Amol ChAmol Ch 

custom domain is not working without www

I've created a website on community. and Set up Custom Domains for Salesforce Sites. I've configured the each and every thing as per this article.
when i type the my website URL like "www.mycompany.com" it works perfectly.

But the same URL is not working without www. means, when I type "mycompany.com" in the browser URL. It doesn't working , it shows blank page.
Please guide.
NagendraNagendra (Salesforce Developers) 
Hi Amol,

DNS redirects naked/apex domains (e.g. "mycompany.com") by using an A or AAAA record (preferably both). The server itself is bound to both domains (e.g. "mycompany.com" and "www.mycompany.com"). However, A and AAAAA records require an IP address. Since we don't have an IP address (because it may change), what we need is a CNAME.

Unfortunately, we can't have a CNAME on a(n) naked/apex domain, because DNS forbids it. What this means is that you'll have to come up with an appropriate solution to work around this problem.

Depending on your DNS provider, you may have to configure a URL Redirect with your provider (which may not work correctly with SSL/TLS/HTTPS), configure an ALIAS record (a non-standard DNS extension that causes the DNS server to return an A record based on a CNAME), or set up your own server to handle the redirect.

If you use a URL Redirect, then the users that visit your site will see the redirected domain (e.g. www.<domain>.com.<org-id>.live.salesforce.com). Otherwise, if you don't want to expose the hidden domain name, you'll need a server that acts as a proxy or one that redirects to the www sub-domain. It would be pretty trivial to set up a server like this, but you will need technical resources in order for this to work.

Hope this helps.

Please mark this as solved if it's resolved.