How do I allow or prevent my site from being embedded as an iFrame under foreign domains?
To allow the Visual Experience Composer (VEC) to embed your website in an iFrame, the CSP (if set) must be changed on your web server setting. Adobe domains must be whitelisted and configured.
For security reasons, you might want to prevent your site from being embedded as an iFrame under foreign domains.
The following sections explain how to allow or prevent the VEC from embedding your site in an iFrame.
Allow the VEC to embed your site in an iFrame
The easiest solution to enable the VEC to embed your website in an iFrame is to allow *.adobe.com
, which is the broadest wildcard.
For example:
Content-Security-Policy: frame-ancestors 'self' *.adobe.com
As in the following illustration (click to enlarge):
You might want to allow only the actual Adobe service. This scenario can be achieved by using *.experiencecloud.adobe.com + https://experiencecloud.adobe.com
.
For example:
Content-Security-Policy: frame-ancestors 'self' https://*.experiencecloud.adobe.com https://experiencecloud.adobe.com https://experience.adobe.com
As in the following illustration (click to enlarge):
The most restrictive access to a company’s account can be achieved by using https://<Client Code>.experiencecloud.adobe.com https://experience.adobe.com
, where <Client Code>
represents your specific client code.
For example:
Content-Security-Policy: frame-ancestors 'self' https://ags118.experiencecloud.adobe.com https://experience.adobe.com
As in the following illustration (click to enlarge):
Content-Security-Policy: frame-ancestors 'self' *.adobe.com *.assets.adobedtm.com;
Prevent the VEC from embedding your site in an iFrame
To prevent the VEC from embedding your site in an iFrame, you can restrict to “self” only.
For example:
Content-Security-Policy: frame-ancestors 'self'
As shown in the following illustration (click to enlarge):
The following error message is displayed:
Refused to frame 'https://kuehl.local/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'".
Personalization & Experiementation Excellence with Recommendations and AI
Adobe Customer Success Webinars
Tuesday, Mar 4, 4:00 PM UTC
Adobe Target innovations, including GenAI, and best practices on AI-powered personalization and experimentation at scale.
RegisterAdobe Target at Summit
Register for these developer sessions:
- Put the Customer at the Center and Build Relationships That Last a Lifetime (attend online)
- Powering Customer Acquisition with AI-Driven Digital Experiences
- How T-Mobile Personalizes Customer Experiences with AI Decisioning
- AI-Powered Personalization: Prudential's Secret to a 135% Engagement Boost
- B2B Transformation Series: Adobe on Adobe Digital Marketing
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more