Can you embed github.com in an iframe?
No — github.com blocks iframe embedding. github.com responds with the HTTP header `X-Frame-Options: DENY`. This is the strictest possible setting: the page refuses to load inside any iframe, on any website, including its own. There is no allowlist and no exception.
Live Test In Your Browser
We just tried loading github.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 github.com Sends
X-Frame-Options: DENY. Because the header is set to DENY, the browser blocks the frame before the page renders and shows a "refused to connect" error instead. No client-side trick gets around it — the decision is made by github.com's server on every response. If you need this content on your site, you must use an official embed endpoint (if one exists) or link out to it.
Source: curated reference · last checked 2026-06-12