Why the Network Metadata Type Is the Security Backbone of Experience Cloud
Every Experience Cloud site in Salesforce is powered by three interconnected metadata types:
CustomSite: Defines the low-level URL path prefix, Guest User Profile, and HTTP domain routing.ExperienceBundle/DigitalExperienceBundle: Stores the Experience Builder pages, components, and branding.Network(networks/<SiteName>.network-meta.xml): Controls Workspaces Administration—who can log into the portal (networkMemberGroups), self-registration rules, password reset emails, Chatter/Topic settings, and whether the site isLive,DownForMaintenance, orUnderConstruction.
Key Metadata Fields on Network
| Field | Type | Description |
|---|---|---|
status |
NetworkStatus |
Live, UnderConstruction, or DownForMaintenance. |
picassoSite |
string |
Links the Network to its corresponding CustomSite (Partner_Portal1). |
networkMemberGroups |
NetworkMemberGroup |
Lists <profile> and <permissionSet> entries that grant login access to the Experience Cloud site. |
sendWelcomeEmail |
boolean |
Controls whether new site members automatically receive the welcome email when granted a member profile/permission set! |
welcomeTemplate |
string |
Developer name of the EmailTemplate sent to new members. |
forgotPasswordTemplate |
string |
Email template used for password reset requests. |
selfRegistration |
boolean |
Enables external users to self-register on the site. |
selfRegProfile |
string |
Default profile assigned to self-registering external users. |
navigationLinkSet |
NavigationLinkSet |
Legacy inline navigation menu items (replaced by standalone NavigationMenu in API v47.0+). |
disablePvtPagesForPwdResetInLWR |
boolean |
(API v67.0+) Prevents users with an expired/temporary password from bypassing password reset to access private pages in LWR sites. |
emailDomainSubstitutionEnabled |
boolean |
(API v68.0+) Substitutes the email sender domain with the Experience Cloud site domain to improve DMARC compliance. |
Real-World XML Example (networks/Partner Portal.network-meta.xml)
<?xml version="1.0" encoding="UTF-8"?>
<Network xmlns="http://soap.sforce.com/2006/04/metadata">
<allowInternalUserLogin>true</allowInternalUserLogin>
<allowMembersToFlag>false</allowMembersToFlag>
<changePasswordTemplate>unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
<disablePvtPagesForPwdResetInLWR>true</disablePvtPagesForPwdResetInLWR>
<emailDomainSubstitutionEnabled>true</emailDomainSubstitutionEnabled>
<emailSenderAddress>support@acme-partners.example.com</emailSenderAddress>
<emailSenderName>Acme Partner Support</emailSenderName>
<enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
<enableGuestChatter>false</enableGuestChatter>
<enableTalkingAboutStats>false</enableTalkingAboutStats>
<enableTopicAssignmentRules>true</enableTopicAssignmentRules>
<forgotPasswordTemplate>unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
<gatherCustomerSentimentData>false</gatherCustomerSentimentData>
<networkMemberGroups>
<permissionSet>Partner_Portal_Member_Access</permissionSet>
<profile>admin</profile>
</networkMemberGroups>
<picassoSite>Partner_Portal1</picassoSite>
<selfRegistration>false</selfRegistration>
<sendWelcomeEmail>false</sendWelcomeEmail>
<site>Partner_Portal</site>
<status>Live</status>
<tabs>
<defaultTab>home</defaultTab>
<standardTab>Chatter</standardTab>
</tabs>
<urlPathPrefix>partners</urlPathPrefix>
<welcomeTemplate>unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
</Network>Warning
The Mass Welcome Email Trap (sendWelcomeEmail): Never deploy a new <permissionSet> or <profile> inside networkMemberGroups to Production while <sendWelcomeEmail>true</sendWelcomeEmail> is enabled if users are already assigned that Profile or Permission Set! Salesforce will immediately blast welcome emails to thousands of existing users the moment the Network deployment finishes.
Querying Network and NetworkMember via SOQL
Both Network and its user membership junction object NetworkMember are standard SOQL objects.
1. Audit All Experience Cloud Sites and Their Status
SELECT Id, Name, Status, UrlPathPrefix, EmailSenderAddress,
OptionsSelfRegistrationEnabled, OptionsSendWelcomeEmail,
LastModifiedDate
FROM Network
ORDER BY Name ASC2. Count Active Members per Experience Cloud Site
SELECT Network.Name, COUNT(Id) totalMembers
FROM NetworkMember
WHERE Member.IsActive = true
GROUP BY Network.NameSenior Architect Best Practices
- Use Permission Sets Instead of Profiles in
networkMemberGroups: Listing Profiles innetworkMemberGroupstightly couples site membership to user profiles and forces every profile into your deployment package. Instead, list onlyadminunder<profile>and manage all customer/partner membership via dedicated<permissionSet>entries. - Environment-Specific
emailSenderAddress: Use SFDX string replacements (sfdx-project.jsonreplacements) for<emailSenderAddress>across Sandboxes and Production, and remember that changingemailSenderAddresson an existing site requires clicking the verification link sent to that inbox.
Frequently asked questions
How does the Network metadata type differ from CustomSite and ExperienceBundle?
Network controls Experience Cloud workspace administration (member profiles, permission sets, self-registration, and moderation). CustomSite configures domain/URL routing and the Guest User profile, while ExperienceBundle or DigitalExperienceBundle stores the actual UI pages and theme.
Why does Network deployment fail when updating emailSenderAddress in Production?
When you modify emailSenderAddress on an existing Network, Salesforce sends a verification email to the new address. The metadata value does not commit until that verification link is clicked, whereas first-time Network creation accepts the address immediately.
How do you control which users can log into an Experience Cloud site via metadata?
Inside the Network metadata file, the networkMemberGroups element lists the allowed profile and permissionSet names. Only users assigned one of those profiles or permission sets become members of the Network.
What new LWR and email security fields were added to Network in recent releases?
API version 67.0 added disablePvtPagesForPwdResetInLWR to block authenticated page access while a user resets their password in LWR sites, and API version 68.0 added emailDomainSubstitutionEnabled for sender domain substitution.
Can you query Experience Cloud Networks and their members using SOQL?
Yes. You can query the Network standard object for Status, UrlPathPrefix, and OptionsSelfRegistrationEnabled, and query NetworkMember to find which users belong to each Experience Cloud site.
Comments
Questions, corrections and tips are welcome. Comments are GitHub Discussions, so you sign in with GitHub.