+ Start a Discussion
Ken Koellner @ EngagewareKen Koellner @ Engageware 

How to get configured Sites domain for Org in Apex

I'd like to get the Sites domain that configured for an org via Apex in order to automate some setup work.  I haven't found a way to do that.  It's probably not there but just in case I missed it in the documentation I figured I'd ask if anyone knows if there's any kind of metadata call to get it.

This is not specific to any one site and VF is not in place so anything that only exists in the context of an executing Site will not work.
Khan AnasKhan Anas (Salesforce Developers) 
Hi Ken,

Greetings to you!

I haven't tried it but I suggest you please refer to the below links which might help you further with the above requirement.





I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas