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):

CSP with broadest wildcard

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):

CSP with ExperienceCloud scoped

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):

CSP with clientcode scoped

NOTE
If you have Launch/Tag implemented, it must be unlocked as well.
For example:
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):

CSP error

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'".

Previous pageApple Intelligent Tracking Prevention (ITP) 2.x
Next pageAllowlist Target edge nodes

Target


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.

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more