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
Sajila KadayaprathSajila Kadayaprath 

How can I unpublish the domain in Salesforce?

I have domain set and published for my dev org. When connecting through trailhead,it is not logging me in as I have the domain active. How can I unpublish the domain?

Thanks,

Sajila

Gaurav KheterpalGaurav Kheterpal
Try opening an incognito window on Chrome - that should allow you to login.

You can’t delete a domain that is attached to a published site. You’ll need to unpublish all sites attached to the domain before you can delete it. For Force.com sites, the domain is deleted immediately, and users no longer have access to any site connected to that domain. But with Site.com sites, the domain remains active until you republish the site.

To delete a domain from your organization:
  • From Setup, click Domain Management | Domains.
  • Click Del next to the domain name.
  • Click OK.When you delete a domain with an unpublished site attached, it also deletes the custom URL associated with that site.

If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others and improve the overall quality of Discussion Forums.

Gaurav Kheterpal
Certified Force.com Developer| Salesforce Mobile Evangelist| Developer Forums Moderator| Dreamforce Speaker
KaranrajKaranraj
I don't think because of domain you are not able to login to Trailhead. If you have namespace only, you can't access the trailhead challenge and you can't deactivate the namespace but still you can create fresh new developer org and access the Trailhead challenges.

Just check If you enabled "Prevent login from https://login.salesforce.com " for your domain, then uncheck the checkbox and try login into trailhead module.
Sajila KadayaprathSajila Kadayaprath
This is the error message I am getting : 

" Trailhead cannot connect to Developer Edition (DE) orgs with custom domains configured. Please connect to a different DE org. "

 
Sajila KadayaprathSajila Kadayaprath
@Karan, Prevent login from https://login.salesforce.com is disabled. And yes,I can connect it to other dev orgs. 
James HanifyJames Hanify
I too have this same issue, very silly on behalf of Salesforce to not allow you to delete this custom domain but yet still have problems connecting
fcathalafcathala
Hi,

This behaviour is not linked to your Site Domains but to your Org MyDomain. Unfortunately it is not possible to disable a MyDomain once setup (https://help.salesforce.com/apex/HTViewHelpDoc?id=faq_domain_name_rename.htm). You can change a MyDomain name but not delete it. Having said that if you feel strongly about using this org then contact Salesforce Support and see if they can revert back to a standard setup without MyDomain - sometimes they can actually do more than officially stated.

My recomendation though would be to follow Salesforce' suggestion and stick to a fresh new DE. Considering that an application will check your work in your connected org the last thing you want is to fail an exercice simply because there is - say - an existing Validation Rule preventing a trigger to behave as expected. Play it safe and spin a new DE!

Hope this helps. :)