Fix Disappearing IFrame Embeds in Modern SharePoint
Question details
Allow approved third-party iframe content to appear on a modern SharePoint communication site.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- A user wants to embed third-party content on a modern SharePoint communication page.
- Observed behavior
- An iframe embed may appear while editing but disappear or fail to display after the page is saved or published.
Identify the exact domain in the iframe's source URL and confirm that it is trusted. You may need a site collection administrator to change HTML Field Security settings.
Allow the Trusted Domain and Republish the Embed
Use this method when SharePoint blocks an iframe source that your organization has approved.
On the SharePoint site, select Settings, then Site information, and choose View all site settings. The available options can vary with your permissions.
Under Site Collection Administration, open HTML Field Security. Choose the option to allow iframes from a list of external domains, add the trusted domain from the iframe source, and save the setting.
Open the modern page and select Edit. Add or select the Embed web part, then paste the supported iframe embed code or website address supplied by the content provider.
Select Republish or Publish, then open the published page and confirm that the content appears. If it still fails, check whether the source site permits embedding in SharePoint.

Use a Supported Web Part or Link Instead
Use an alternative when the source cannot be embedded or the modern Embed web part does not support the supplied code.
Create Office-Compatible Content with WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface for creating documents, spreadsheets, and presentations. Its compatibility with common Microsoft Office formats helps you move existing files into your workflow. It does not change SharePoint iframe settings.

Frequently Asked Questions
Where can I allow an iframe domain in SharePoint?
Open the site's Settings, select Site information, and then View all site settings. Under Site Collection Administration, open HTML Field Security and add the trusted domain to the allowed list.
Why does my iframe work in edit mode but disappear after publishing?
SharePoint may restrict the source or the embed code when the page is saved. Check HTML Field Security, use the modern Embed web part, and confirm that the source website allows embedding.
Why is an allowed domain still not displaying?
The external website may block framing through its security headers, require authentication, or provide unsupported embed code. Check the provider's sharing instructions and test the published SharePoint page.
Can I use other HTML code in the modern Embed web part?
The Embed web part supports website addresses and supported iframe-based embed code, but not arbitrary script-based embed code. If the provider only supplies unsupported code, use a Link web part or another supported web part.




