Others

Fix Disappearing IFrame Embeds in Modern SharePoint

Amos GikundaAmos Gikunda Nov 20, 2026 869 views

Question details

Allow approved third-party iframe content to appear on a modern SharePoint communication site.

Fix Disappearing IFrame Embeds in Modern SharePoint
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.
Before you start

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.

Solution 1Recommended

Allow the Trusted Domain and Republish the Embed

Use this method when SharePoint blocks an iframe source that your organization has approved.

1
Open site settings

On the SharePoint site, select Settings, then Site information, and choose View all site settings. The available options can vary with your permissions.

2
Allow the source domain

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.

3
Add the embed

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.

4
Publish and test

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.

Allow the Trusted Domain and Republish the Embed
Embedding restrictions: Allowing a domain in SharePoint does not override the source site's restrictions. The provider may block embedding through security headers or require its own access permissions.
Free Microsoft Office alternative

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.

Create documents and presentations to share alongside a SharePoint page.Open and edit common Microsoft Office formats, including DOCX, XLSX, and PPTX.Use a familiar interface for a smoother transition from Microsoft Office.Work with a free, lightweight office suite.
microsoft office alternative - wps office

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.