Allow or restrict the ability to embed content on SharePoint pages

Allow or restrict the ability to embed content on SharePoint pages

Site collection administrators control whether users can embed content from external websites. If they don't let contributors embed content, users who try to do so will see an error message that says, “Embedding content from this website isn't allowed.”

Site level settings

Site collection admins can turn off embedding content, allow embedding content from a specific list of sites, or allow embedding from any site by changing the HTML Field Security setting in site settings. Here's how:

  1. Browse to the root site of your site collection.

  2. Click Settings  Settings button from SharePoint Online , click Site Settings. If you don't see Site settings, click Site information and then click View all site settings.

  3. On the Site settings page, under Site Collection Administration, click HTML Field Security.

    Select HTML Field Security Settings to control a users ability to embed content

  4. Select one of the following options:

    • Don't allow contributors to insert iframes from external domains to disallow the use of iFrames for all sites in the site collection.

    • Allow contributors to insert iframes from any domain to allow the use of iFrames for all sites in the site collection and to allow data from any external website to be displayed in the iFrame. For security reasons, we do not recommend this option.

      Note: When custom scripting is turned off for your site, this option applies only to the Embed web part. All other HTML fields will only allow embedding from the specified list of external domains described below. For more information on scripting, see Allow or prevent custom script.

    • Allow contributors to insert iframes only from the following domains to add a web domain to a list of domains whose content can be displayed in iframes in the site collection. To remove a website from the list, select it, and then click Remove.

      Set the restrictions on adding iFrames

  5. Click OK.

SharePoint comes with a default list of web sites from which content can be displayed. You can add or remove sites in this list.

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×