function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chris WilliamsChris Williams 

How are domain names managed in My Domains vs Force.com Sites in Sandbox vs Production?

How are domain names managed in My Domains vs Force.com Sites in Sandbox vs Production?

I am trying to understand how domains are used under "Domain Management" vs how a domain is set from "Develop"->"Sites"

We currently have two domains setup under Domain Management.  "mycompany.force.com" & "mycompany.my.salesforce.com".  Currently "mycompany.force.com/xxx" is setup to point to a communities site.

We want to create a force.com site and it tells us that we need to register a force.com domain.  So we try to do that using the domain "mycompany".  But it says that the domain is already in use.  Is that because we are using it for the communities site?  If so, is there a way to use it in both?

Also once we do lock in on the domain we want to use, should we create it in the sandbox first?  So in the sandbox would it be created as "mysandbox-mycompany.xxxxx.force.com".  Then on the production instance it would be "mycompany.force.com"?  Or would creating it in the sandbox steal it away from production.
nitesh gadkarinitesh gadkari
Hi Chris,

What I know is that for your mycompany domain you can attach multiple sites with /xxx after your registered domain.I am attaching snapshots for you.


User-added image


User-added image

User-added image

If this helps,please mark it as best answer.
Chris WilliamsChris Williams
Hi nitesh,

Thanks for the reply.  Yes, i understand how to create multiple force.com sites with /xxx after a domain has been registered.  I am currently trying to understand registering the domain its self.  and specifically if domains can be shared across a communities site and force.com sites.  And in Sandbox vs. Production like in the original question.  Let me know if i need to clarify.
Jim WilliamsJim Williams
Chris, please let me know if you have an answer to this.  I can say with certainty that no you cannot share the domain between communities and sites.   They cannot be the same.  What I am not clear on with certainty is the sandbox vs production community domain.  We are working with a 3rd party vendor to build out some communities in the sandbox - we do not even have communities active in production yet.  I was told that we can set up a separate domain for the sandbox (which we did) but I do not know however if this "test only" domain will still be in effect once we activate communities/choose the domain name in production and refresh the sandbox.