I'm looking for a way to get the registered Force.com domain from Apex. At the moment I just want to check if there is a domain or not.
This is the domain you register once, when trying to create a public site.
I know you can find the subdomain for a site by querying the field subdomain
in the object Site
, however, it is possible that a domain is registered but a Site wasn't created. How can I figure out the force.com domain in that scenario?