Streaming live at 10am (PST)

iFrame doesn't work

Hey, my i frame code doens’t work, have anyone a Idea?

<iframe src="https://mattermost.rto.de" width="100%" height="1900px" frameborder="0"></iframe>

Link:
https://preview.webflow.com/preview/test-1e1310?utm_medium=preview_link&utm_source=dashboard&utm_content=test-1e1310&preview=1515b829b0201933420dae0929a19555&mode=preview

Thank you for help

You cannot frame the site, the site is sending headers that forbids browsers to display the site in a frame.

X-Frame-Options: SAMEORIGIN
1 Like

okay, Thank you for help

You cannot display a lot of websites inside an iFrame. Reason being that they send an “X-Frame-Options: SAMEORIGIN” response header. This option prevents the browser from displaying iFrames that are not hosted on the same domain as the parent page.

I faced the same error when displaying youtube links. For example: https://www.youtube.com/watch?v=8WkuChVeL0s

I replaced watch?v= with embed/ so the valid link will be: https://www.youtube.com/embed/8WkuChVeL0s

It works well.

Try to apply the same rule on your case.

SAMEORIGIN

The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain, although it is argued that the option is not very useful unless all ancestors are also in the same origin.