Converting a URL into an iframe
Last updated:
"Iframely" is a way one piece of content from a site gets moved to another site. It is both technical and trust intermediary between consumers and providers of rich media.
While we support over 2000 providers, Iframely isn’t designed to wrap arbitrary web pages into iframes. Our platform focuses on retrieving rich media players for videos, slideshows, or other interactive content.
Here's more about how Iframely works:
- Content parsing: when you input a URL, Iframely parses the webpage and tries to detect recognized protocols and embed codes. For example, if you link to a YouTube video, Iframely will find the appropriate player embed code provided by YouTube itself.
- Supported embeds: if the publisher has rich media embeds (like video players, slideshows, or maps), Iframely will retrieve the necessary code and render it within an iframe so the content appears in your application.
- Fallback to URL summary cards: if no embed code is available, Iframely generates a summary card with a preview of the URL. This is similar to how platforms like Twitter or Facebook display URL previews.
That said, if you need to embed a specific link as an iframe from a provider we don’t normally support, there are two ways to allow it.
First way is to have an app implement iframe fallback for their end-users. If you do need to wrap a page into an iframe for your app, here's how to verify that a publisher permits it:
- Reach out to us to let us know you need it. We'll add a feature flag for it to your account with us.
- The feature will provide values of
X-Frame-Options
andContent-Security-Policy (CSP)
headers for the given URL if any restrictive policies are set by the publisher. These headers regulate whether a URL can be embedded as an iframe. - You will get the value of those headers in the
`meta`
section of Iframely API JSON as`xframe`
and`csp`
fields respectively. Please check the values to see if you can build an iframe for your URL. For simplicity, we recommend handling any returned values of those headers as an indication that you should not embed the URL of that provider as an iframe.
The other way to embed iframe as a link for individual URLs, if the app you try to embed it in allows that, is to reach out to Iframely support. Please use this form and choose “Help with a specific URL”. Provide the working link, your desired widget size, and where you plan to embed it. If it is feasible, we will provide you with a unique one-off shortlink that you could use to embed your link as an iframe.