SfSkills Domains Docs GitHub

Home / admin / experience-cloud-site-setup

experience-cloud-site-setup

Use when creating a new Experience Cloud site: selecting LWR vs Aura template, configuring branding and navigation, setting up a custom domain, and using Experience Builder.

Open the skill folder on GitHub


Experience Cloud Site Setup

Use this skill when a practitioner needs to create a new Experience Cloud site from scratch: selecting the right template (LWR vs Aura), configuring branding and navigation menus, setting up a custom domain, and using Experience Builder to manage the page structure. This skill covers the site creation and initial configuration lifecycle — not ongoing content authoring or Flow orchestration inside an established site.


Before Starting

Gather this context before working on anything in this domain:


Questions to Ask Before Configuring

Ask these before creating anything in Setup. Each one traces to a behaviour that is either irreversible or fails silently, and every row maps to a gotcha in references/gotchas.md.

AskWhy it mattersWhat a good answer adds
"Which components does this site have to render — name them, and say LWC or Aura for each?"Template family is fixed at creation and the LWR component picker offers LWC onlyThe component inventory that decides LWR vs Aura before anything is created (Gotchas 1, 3)
"What sender address will portal emails come from, and is it already verified in this org?"emailSenderAddress can only be supplied on the deploy that creates the site; later Metadata API updates are ignored with no errorA verified address on day one instead of an unfixable one on day thirty (Gotcha 6)
"Is this site enhanced LWR created in Winter '23 or later, or something older?"It decides whether the content bundle is DigitalExperienceBundle or ExperienceBundle — and enhanced LWR cannot be packagedThe right retrieve manifest, and an early answer on whether packaging is even available (Gotcha 8)
"Who becomes a member, by profile or by permission set, and on which community licence?"networkMemberGroups confers membership, never a licence, and the permission-set path skips Chatter customersThe membership shape plus the licence decision, taken with admin/portal-requirements-gathering (Gotcha 11)
"Can anyone self-register, and if so onto which profile — and what stops duplicate Contacts?"selfRegistration is one site-wide boolean; selfRegProfile is not required by the deploy but is required by realityA named profile and a matching/duplicate rule pair, not a switch left on (Gotcha 12)
"What is the URL path prefix, and who else already links to it?"The prefix lives in three places (Network, the content bundle, CustomSite) that must agree, and every email template embeds itOne prefix agreed once, and the list of links a later rename would break (Gotcha 10)
"Does this site ever need to come back offline after go-live?"UnderConstruction is a one-way door; DownForMaintenance is the only route backA documented offline procedure rather than a status value that quietly does nothing (Gotcha 7)

What a proper configuration adds over just clicking through New Site: the template matches the components that actually exist, the site's settings are in source as Network + CustomSite + NavigationMenu rather than trapped in Setup, the email sender is right on the only deploy that can set it, and publishing is a deliberate status change you can prove with SOQL instead of a screenshot.


Core Concepts

LWR vs Aura Template Selection

Experience Cloud offers two primary template families. The choice is permanent post-creation.

LWR templates (Build Your Own LWR, Microsite LWR):

Legacy Aura template (Build Your Own):

Partner Central and Customer Account Portal templates:

Custom Domain Configuration

Experience Cloud sites are accessed via a URL on the pattern MyDomainName.my.site.com/site-path. The subdomain is set by My Domain in org settings. The site path is urlPathPrefix — the first part of the path that distinguishes this site from other sites (Metadata API Guide, Network, api_meta.txt L91084–L91089). The platform does allow it to change: Network.UrlPathPrefix carries the Update property (Object Reference, Network, object_reference.txt L187375–L187378). Treat it as fixed anyway — the same prefix is duplicated in the content bundle and the CustomSite, and all three must move together (references/gotchas.md, Gotcha 10).

For LWR sites, clean URL paths work without the /s prefix. Aura sites append /s to all page paths automatically. This distinction matters when sharing deep links or setting up redirects.

Experience Builder and Branding

Experience Builder is the drag-and-drop page editor for Experience Cloud. It manages pages, navigation menus, site settings, and branding. For LWR sites:

The Metadata Behind a Site

A site that only exists in Setup cannot be reviewed, diffed or promoted. Four types carry it, and they are separate files in separate directories:

TypeDirectoryHolds
Networknetworks/Site settings: status, members, email senders and templates, self-registration, urlPathPrefix
CustomSitesites/The container: active, indexPage, clickjackProtectionLevel, siteAdmin, siteType ChatterNetwork
NavigationMenunavigationMenus/Menu items — replaced the navigationLinkSet subtype on Network in API 47.0 (api_meta.txt L90951–L90954)
ExperienceBundle or DigitalExperienceBundleexperiences/ or digitalExperiences/site/Pages, routes, themes, branding sets — one type or the other, never both

Network.site is a Required reference to the CustomSite (api_meta.txt L91045), so the two always ship together. Which bundle type applies is not a preference: enhanced LWR sites created in Winter '23 or later use DigitalExperienceBundle; Aura sites and other LWR sites use ExperienceBundle (api_meta.txt L51234–L51236). Full deployable XML, package.xml, retrieve/deploy commands and verification SOQL are in references/metadata-examples.md.

Publish Model and Cache Implications

LWR sites use a publish-time freeze model. When you publish:

  1. Component trees are resolved and frozen.
  2. Pages are cached via HTTP caching at the CDN layer.
  3. Visitors receive the cached version until the next publish.

Any change to a page, component, or branding requires an explicit republish. Forgetting to republish is the most common reason practitioners report that changes "did not go live."


Common Patterns

Pattern: New Customer Portal with LWR Template

When to use: Building a net-new self-service customer portal where all components are LWC-based or will be built as LWC. Performance at scale is a priority.

How it works:

  1. In Setup, navigate to Digital Experiences > All Sites > New.
  2. Select Build Your Own (LWR) template.
  3. Name the site and set the URL path (e.g., portal). The full URL becomes MyDomainName.my.site.com/portal.
  4. Once the site is created, open Experience Builder.
  5. Define branding tokens in the Branding Set editor. Set --dxp-color-brand, --dxp-color-background, and font tokens.
  6. Configure navigation menus: add top-level items, set visibility rules (public vs authenticated).
  7. Build or assign custom LWC pages using the Page Manager.
  8. Publish the site. Verify the published URL resolves correctly.

Why not Aura: Aura templates lack publish-time HTTP caching. For high-traffic portals, the LWR CDN caching model significantly reduces server load and page load times.

Pattern: Partner Community with Pre-Built Template

When to use: Standing up a partner portal quickly using standard partner workflows (deal registration, lead sharing, channel dashboards) without heavy custom branding.

How it works:

  1. Select the Partner Central template during site creation.
  2. Enable the Partner Community license on the relevant profiles.
  3. Configure sharing settings for Opportunities, Leads, and Accounts as needed.
  4. Use Experience Builder to adjust navigation and page layout without full custom builds.
  5. Customize branding through the Experience Builder theme panel.

Why not Build Your Own: Partner Central ships with pre-wired pages for partner-specific objects. Starting from scratch duplicates work that the template handles automatically.


Decision Guidance

SituationRecommended ApproachReason
All components are LWC, performance mattersBuild Your Own (LWR)Publish-time freeze enables HTTP caching; clean URL paths
Must include existing Aura components that cannot be migratedBuild Your Own (Aura)Only template supporting Aura components
Small marketing landing page or micrositeMicrosite (LWR)Lightweight LWR template optimized for minimal, focused public sites
Standard partner portal with deal registrationPartner CentralPre-built pages for partner workflows; faster time to value
Standard customer self-service portalCustomer Account PortalPre-built case and account pages; appropriate for straightforward use cases
Unsure — new build, greenfieldBuild Your Own (LWR)LWR is the strategic direction; Aura templates are not receiving new investment

  1. Answer the seven questions above and record the template decision. Work through

    ## Questions to Ask Before Configuring, then fill the Pre-Creation Checklist and Component Inventory in templates/experience-cloud-site-setup-template.md. Template family and urlPathPrefix are settled here, before anything is created, because neither is recoverable cheaply afterwards.

  2. Verify the sender address exists and is verified in the target org. emailSenderAddress

    is Required on Network and can only be supplied on the deploy that creates the site; later Metadata API updates are silently ignored (references/gotchas.md, Gotcha 6). Template selection itself is admin/email-templates-and-alerts.

  3. Create the site, then retrieve it into source immediately. In Setup → Digital

    Experiences → All Sites → New, choose the template from the Decision Guidance table. Then pull CustomSite, Network, NavigationMenu and whichever bundle type the org returns — the retrieve tells you whether this is experiences/ (ExperienceBundle) or digitalExperiences/site/ (DigitalExperienceBundle). Commands are in references/metadata-examples.md.

  4. Write the settings in source, not in Setup. Set networkMemberGroups (profiles or

    permission sets), selfRegistration with its selfRegProfile, the email templates, maxFileSizeKb and allowedExtensions on the Network; set clickjackProtectionLevel, allowStandardPortalPages and redirectToCustomDomain on the CustomSite. Shape and field semantics are in references/metadata-examples.md.

  5. Build branding and navigation. For LWR, define the branding set (brandingSetType

    APP, definitionName matching the template, e.g. starter:branding-starter) and have component CSS consume --dxp-* tokens rather than literals. Author the primary menu as a NavigationMenu file, and create a matching page for every SalesforceObject item — LWR and Help Center templates ship no generic record pages (api_meta.txt L90449–L90452).

  6. Run the checker, then validate, then deploy in dependency order.

    python3 skills/admin/experience-cloud-site-setup/scripts/check_experience_cloud_site_setup.py --manifest-dir force-app/main/default catches a Live site with self-registration and no profile, an empty networkMemberGroups, missing Required Network fields, a requireHttps element that does nothing, weak clickjack protection, non-https external menu targets, and a Network whose Experience Builder folder is absent. Then sf project deploy validate, then deploy sites/ before networks/.

  7. Publish and prove it. Move Network.status to Live, publish the Builder content,

    and confirm the result with SOQL rather than a page load: SELECT Status, UrlPathPrefix FROM Network WHERE Name = '<site>' plus SELECT COUNT(Id) FROM NetworkMember WHERE Network.Name = '<site>'. Test as a guest in a private window and as an authenticated member. Guest permissions themselves are admin/experience-cloud-guest-access.


Review Checklist

Run through these before marking work in this area complete:


Salesforce-Specific Gotchas

Non-obvious platform behaviors that cause real production problems:

  1. Template is permanent post-creation — Once a site is created with a given template, there is no "change template" option. To switch from Aura to LWR (or vice versa), the site must be deleted and recreated. Any customizations, pages, and navigation configuration must be rebuilt from scratch. Always confirm the template before creation.
  2. LWR requires explicit republish — Changes made in Experience Builder on an LWR site (including branding and component edits) do not go live until the site is republished. The site serves the last published version from cache. Practitioners coming from Aura expect changes to appear immediately; on LWR they do not.
  3. Aura components cannot be used in LWR sites — The LWR template component panel only exposes LWC-compatible components. Attempting to use an Aura component in an LWR site will fail silently (the component simply will not appear in the picker). The fix is to migrate the component to LWC or switch to an Aura-based template.
  4. emailSenderAddress cannot be changed by a second deploy — the field is Required, is honoured only on the deploy that creates the site, and later Metadata API updates are discarded without an error (api_meta.txt L90784–L90795).
  5. UnderConstruction never comes back — once a site has been published it can never return to that status (object_reference.txt L187373). DownForMaintenance is the only way to take a live site offline.
  6. ExperienceBundle and DigitalExperienceBundle are not interchangeable — enhanced LWR sites from Winter '23 onward use the latter, everything else the former, and packaging is unsupported for enhanced LWR (api_meta.txt L51234–L51238).

All twelve, with What happens / When it occurs / How to avoid, are in references/gotchas.md.


Output Artifacts

ArtifactDescription
Published Experience Cloud siteLive site accessible at MyDomainName.my.site.com/path with correct template, branding, and navigation
Branding set configurationLWR branding tokens (--dxp-* CSS custom properties) or Aura theme panel settings defining the site's visual identity
Navigation menu structurePrimary (and optional secondary/footer) menus with visibility rules configured in Experience Builder
Site setup checklistCompleted template from templates/experience-cloud-site-setup-template.md documenting decisions and configuration

Reference Files

FileRead it when
references/metadata-examples.mdWriting or reviewing the deployable XML: Network, CustomSite, NavigationMenu, the content bundle, package.xml, retrieve/deploy, verification SOQL
references/gotchas.mdA deploy succeeded but the org did not change, or a site behaves differently from its source
references/well-architected.mdJustifying the template and publish model against the pillars, and finding the official sources used
references/examples.mdTwo worked site builds (LWR self-service, Partner Central) and the Aura-in-LWR anti-pattern
references/llm-anti-patterns.mdReviewing AI-generated Experience Cloud guidance before acting on it
templates/experience-cloud-site-setup-template.mdRecording the pre-creation decisions: edition, component inventory, template, URL path
scripts/check_experience_cloud_site_setup.pyLinting retrieved source before sf project deploy validate

Package files