askvity

How Do I Delete a Site in Salesforce?

Published in Salesforce Administration 3 mins read

The direct answer to how to delete a Force.com Site in Salesforce is that you cannot delete Force.com Sites once they are created. This is a fundamental limitation of the Salesforce platform regarding Sites.

While you cannot permanently remove a site configuration, Salesforce provides alternative methods to manage unwanted or outdated sites.

Managing Existing Salesforce Sites

Since deletion is not an option, Salesforce offers different ways to handle sites you no longer wish to use in their current form.

Deactivating a Site

The primary method for taking a site offline is to deactivate it. Deactivating a site prevents external users from accessing its pages. This effectively makes the site inaccessible without removing its configuration.

Reusing a Deactivated Site

Even though you can't delete a site, you can reuse a deactivated site configuration for a new purpose. This means you can:

  • Deactivate the old site.
  • Keep the site's domain name (or potentially change it by contacting Salesforce Support).
  • Delete or modify the existing pages associated with that site.
  • Upload new pages or build new functionality on the existing site record.

This allows you to leverage the established site configuration without needing to create a brand new one (which would result in yet another non-deletable site record). The reference confirms that Force.com Sites cannot be deleted once they are created. It explicitly states you can "re-use a deactivated site to house your new Force.com Site pages" and "choose to delete all or some of the existing pages, to fit your new use case."

Changing the Domain Name

If your primary goal is to change the domain name associated with a site, you cannot do this yourself through standard configuration. According to the reference, if you want to change the domain name for your site, you must contact Salesforce Support.

Summary of Options

Here's a quick overview of how to manage unwanted Salesforce Sites:

Goal Action Outcome
Remove site access Deactivate the site. Site becomes inaccessible externally.
Use a new site path Deactivate the old site & reuse it for new pages. Uses existing site record, new content is live.
Change the site domain Contact Salesforce Support. Domain name may be updated by Salesforce personnel.
Permanently delete site Not possible. (Force.com Sites cannot be deleted once created) Site record remains in your organization.

In conclusion, while the concept of "deleting" a site doesn't exist in Salesforce, you can manage their visibility and content effectively through deactivation and reuse.

Related Articles