Newer Version Available
Before Using CMS Connect
Your HTTP server must serve HTML fragments
CMS Connect requires an HTTP server that can serve HTML fragments, either static or rendered on demand. Fragments can include headers, footers, components, CSS, or JavaScript.
URLs in CSS and JavaScript must be absolute
URLs in CSS and JavaScript must be absolute. Relative URLs in HTML are okay and are converted for you. CMS Connect appends host names and converts relative URLs to absolute URLs in the following HTML tags and attributes:
- <img> tag src attribute
- <audio> tag src attribute
- <input> tag
- <button> tag formaction attribute
- <video> tag src and poster attributes
- <a> and <area> tags href attribute
- <form> tag action attribute
- <del>, <ins>, <blockquote>, and <q> tags cite attribute
- <script> tag src attribute
Community Host must be a trusted host in the Cross-Origin Resource Sharing (CORS) header
CMS Connect uses Cross-Origin Resource Sharing (CORS) to access external content. Make sure to add Community Host to the list of trusted hosts in the CORS header in your CMS system.
CORS is a web standard for accessing web resources on different domains. CORS is a required technology to connect your CMS to Salesforce. It’s a technique for relaxing the same-origin policy, allowing JavaScript on a web page to consume a REST API served from a different origin. CORS allows JavaScript to pass data to the servers at Salesforce using CMS Connect.
To enable CORS in development environments, we recommend using a Chrome plugin. For production environments, please visit your CMS documentation on enabling CORS.
For more information about CORS, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS.
Some tags and scripts aren’t allowed
CMS Connect filters out the same HTML tags that Lightning Locker and Aura components do. Get familiar with these now to avoid surprises later. See “Add Markup to the Page <head> to Customize Your Community” in the Salesforce online help for a list of supported tags.
All CMS servers must be accessible via unauthenticated HTTPS (HTTP over SSL)
All CMS servers you connect must be accessible via unauthenticated HTTPS (HTTP over SSL) to retrieve HTML and JavaScript. When you set up a CMS connection, the server URL you enter must start with HTTPS. This is to ensure all web communications that are required remain private. An SSL certificate is required for unauthenticated HTTPS for all traffic between your servers and Salesforce.
All JavaScript and CSS must be from the same source as HTML
All JavaScript and CSS files referenced by your HTML must point to your CMS source.
Experience Workspaces must be enabled
To use CMS Connect, you must have Experience Workspaces enabled in your Community Settings. From Setup, go to Community Settings. Make sure the Enable Experience Workspaces checkbox is selected.
CMS Connect org perm must be left on
CMS Connect is controlled by an org permission that is turned on by default. If you’re not seeing CMS Connect in your Experience Workspaces, it’s possible that the permission is turned off. You can ask Salesforce Customer Support to turn it back on for you.