SharePoint Document Issues

Why SharePoint Online Blocks External-Domain Iframes

Chanuka GeekiyanageChanuka Geekiyanage Nov 22, 2026 868 views

Question details

Understand why an external website cannot embed a SharePoint Online page in an iframe and why the iframe HTML setting does not override the restriction.

Why SharePoint Online Blocks External-Domain Iframes
Product
SharePoint Online
Device & OS
not provided
Scenario
A user wants to display a SharePoint Online page inside an iframe on a website hosted on another domain.
Observed behavior
The browser blocks the framed SharePoint page even when the SharePoint setting allows contributors to insert iframe HTML.
Before you start

Confirm that the iframe source is a SharePoint Online page and that the website hosting the iframe is on an external domain. Check the browser developer console for a framing or Content Security Policy error.

Solution 1Recommended

Link to the SharePoint Online page instead of framing it

Use a direct link when visitors need to access a SharePoint page from an external website.

SharePoint Online uses browser-enforced security headers, such as X-Frame-Options and Content Security Policy frame-ancestors directives, to restrict where its pages can be framed. There is no supported setting that overrides these headers to allow an external site to frame a SharePoint Online page.

The HTML Field Security setting controls which external iframe content contributors can add to SharePoint. It does not control whether an external website can frame a SharePoint page.

1
Copy the page link

Open the SharePoint Online page and copy its URL from the browser address bar, or use Share to copy a link if that option is available.

2
Add a link to your website

In your website editor, replace the iframe with a link or button that points to the copied SharePoint URL.

3
Check visitor access

Open the link as an intended visitor and confirm that the visitor has the required SharePoint permissions and can sign in if prompted.

Link to the SharePoint Online page instead of framing it
A link does not grant access: Visitors must have permission to view the page. External sharing, if needed, depends on your organization's SharePoint settings.
Free Microsoft Office alternative

Work with Office documents in WPS Office

WPS Office is a free, lightweight alternative for working with documents in a familiar interface. Its Office format compatibility helps you move existing files into WPS, although it cannot change SharePoint Online's iframe restrictions.

Edit documents that you may link to from a website instead of framing a SharePoint page.Work with Microsoft Office formats including DOCX, XLSX, and PPTX.Use a familiar interface to ease the move from Microsoft Office.Access a free, lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my SharePoint page show an error inside an iframe?

SharePoint Online sends security headers that can prevent its pages from being framed by external domains. Open your browser's developer console to check for an X-Frame-Options or Content Security Policy framing error.

Does allowing iframes in HTML Field Security let external sites embed SharePoint pages?

No. HTML Field Security governs external iframe content inserted into SharePoint; it does not change the headers that restrict embedding SharePoint pages on external sites.

Can I change the SharePoint Online headers to allow my website to frame a page?

There is no supported SharePoint Online setting to override those framing headers for an external website. Use a direct link to the SharePoint page instead.

Will a direct link let external visitors see the SharePoint page?

Only if they have the required access. Check the page's sharing permissions and your organization's external sharing settings, then test the link with an intended visitor.