Can you embed stackoverflow.com in an iframe?
No — stackoverflow.com blocks iframe embedding. stackoverflow.com responds with `X-Frame-Options: SAMEORIGIN`. The page can only be framed by pages on the same origin (stackoverflow.com itself). From any other domain — including yours — the browser blocks it.
Live Test In Your Browser
We just tried loading stackoverflow.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 stackoverflow.com Sends
X-Frame-Options: SAMEORIGIN. SAMEORIGIN is common for logged-in dashboards and account pages: stackoverflow.com frames its own pages internally but refuses every external embedder. You will see the page load fine when you open it directly, but a "refused to connect" error inside an iframe on your site. Use an official embed method if stackoverflow.com offers one.
Source: curated reference · last checked 2026-06-12