Loading

Custom Fonts Not Applied in Salesforce Experience Cloud Experience Builder

Date de publication: May 25, 2026
Description

In Salesforce Experience Cloud (formerly Community Cloud), it is possible to add a custom font to an Experience Site to control site branding. However, there is a known limitation when an Experience Site has multiple domains — for example, both a custom domain and the native Force.com subdomain with a path prefix.
In this scenario, the custom font may be applied correctly on the live site but not reflected when viewing the site in Experience Builder, or vice versa.

Why this happens:
The @font-face CSS declaration used to apply custom fonts requires specifying a relative URL to the font resource. If the native Force.com subdomain has a path prefix (e.g., /Prefix), that prefix must be included in the font-face URL. Most custom domains do not have a path prefix. This creates a mismatch: the font works on the domain whose URL pattern matches the font-face declaration, but not the other.

For example:

  1. ExperienceSite1 has two domains:
    • Native force.com subdomain with path prefix: https://example.force.com/Prefix
    • Custom domain: https://example.custom.com
  2. Following our documentation, a font-face is created and added to the Experience:
@font-face {
    font-family: 'exampleFont';
    src: url('/s/sfsites/c/resource/MyFonts/bold/exampleFont.woff') format('woff');
}
 
    • This URL has no path prefix — so fonts render correctly on the custom domain live site.
    • In Experience Builder (which uses the native Force.com URL with the path prefix), the font does not load.
Résolution

This is a known limitation of Salesforce Experience Cloud when a site has both a custom domain and a native Force.com subdomain with a path prefix.

Recommended approach: Write the @font-face URL so that the custom font is applied correctly on the live site (using the custom domain, no path prefix):
src: url('/s/sfsites/c/resource/MyFonts/bold/exampleFont.woff') format('woff');
This means the font will not render in Experience Builder (which uses the path prefix URL), but it will display correctly for end users on the live site. The live site experience takes priority for most organizations.

Testing Recommendation

Always test custom font changes in a sandbox environment before applying them to a Production org.

Numéro d’article de la base de connaissances

000389103

 
Chargement
Salesforce Help | Article