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.

  • I can see the forwarding is working now. I have answered a similar question here . Let me know if you are having any issues.
    – Saroj Bera
    Jun 16, 2017 at 6:32
  • @SarojBera Thanks for your help. I got the solution.
    – Amol
    Jun 19, 2017 at 6:40

3 Answers 3


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.

In your comments, you mentioned that you use GoDaddy. According to their instructions, there is a way to set up a Forward Address for your naked domain, but this may have some intentional side effects, so be aware of that. Setting up your own server to handle the redirect, pointed to by an A record on the naked domain, is probably your best bet, but you will need to set up some hosting. A simple virtual server from AWS or something should be sufficient; I don't see why you'd have to commit more than about $5/month to this redirect effort.

  • I've setup the forwarding in Godaddy but not getting any luck. Can you please provide any article to resolve issue.
    – Amol
    Jun 16, 2017 at 5:57

Set up a Custom domain as per this article. after configuration it will take some time to activate the domain.

Once you follow all steps your custom domain will work with www. i.e. www.mycompany.com will be wokring.

Now To resolve the issue of naked domain(without www). Follow the below steps.

In godaddy control panel they provide a forwarding option.

In forwarding, select https:// and put the your website name i.e. www.mycompany.com

select the 301 redirect and keep the redirection is forward Only and Click on save.

For more details check link

After some time it will be work. when you type mycompany.com in the URL of browser it will automatically redirect to https://www.mycompany.com


I would not recommend a CNAME record for the naked domain, since that can interfere with MX records for email services to that domain.

You are probably better off setting up a URL redirect for @ that will point to www.mycompany.com

Here's namecheap's knowledge article on the topic: link.

enter image description here

  • 2
    Hi martin, thanks for pointing out that CNAME doesn't work on root domains (it's been a while since I've been a webmaster). However, URL Redirect records typically do not support SSL, and are non-standard (do not work with all DNS providers); they happen to work with namecheap and some other providers, but may not work with the OP's provider. A better version of this answer would include "contacting support for their DNS provider" to figure out the correct approach, such as an ALIAS record or some other mechanism.
    – sfdcfox
    Jun 5, 2017 at 8:08
  • @sfdcfox Interesting. I think you'll be able to post a better answer than me though at this point though.
    – martin
    Jun 5, 2017 at 8:15
  • @martin To create the A record on godaddy we need a Hosting IP of the website. How to get the hosting IP address for the community in salesforce. I've tried to get the IP address by using #nslookup but I'm not sure it is the correct one or not.
    – Amol
    Jun 5, 2017 at 8:58
  • @Amol To get the IP address of a site, I also like the host command, or my web browser's network monitor. I don't think salesforce guarantees that a force.com site will stay at a particular ip address though.
    – martin
    Jun 5, 2017 at 9:02
  • @martin I'm not getting what you try to say. may be I'm aware of your solution. Can you please clarify me this.
    – Amol
    Jun 5, 2017 at 9:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .