Can you embed instagram.com in an iframe?
No — instagram.com blocks iframe embedding. instagram.com sends `Content-Security-Policy: frame-ancestors 'self'`. Only pages on instagram.com's own origin may frame it; every external site is blocked.
Live Test In Your Browser
We just tried loading instagram.com in a real iframe below. If the site appears, embedding works from your browser. If it stays blank or shows an error, it is blocked.
What instagram.com Sends
CSP frame-ancestors 'self'. This is the CSP-based equivalent of SAMEORIGIN. instagram.com permits framing within its own domain but rejects yours. An official embed endpoint is the only supported way to display this content elsewhere.
Source: curated reference · last checked 2026-06-12
The Right Way To Embed Instagram
Use the post embed code (instagram.com/p/POST_ID/embed) or the oEmbed API.
<iframe src="https://www.instagram.com/p/POST_ID/embed"
width="400" height="480"
frameborder="0" scrolling="no"
allowtransparency="true"></iframe>Profile pages block framing via CSP. Individual posts expose an /embed endpoint.
Full guide: how to embed Instagram →