How to embed an Instagram feed on Google Sites?
By Zyff
Short answer
Use Insert → Embed → Embed code and paste the widget's HTML there — not the 'By URL' tab, which only accepts a page address and will not work. Google Sites places whatever you paste inside a sandboxed iframe on a separate origin, so the widget renders inside a fixed-size box that you then resize by dragging its handles.
That sandbox is why Google Sites is the platform most likely to break an otherwise working embed, and why the sizing has to be set by hand.
What Google Sites does to your code
Unlike WordPress or Squarespace, Google Sites does not paste your HTML into the page. It wraps it in an iframe served from googleusercontent.com, isolated from your site's document. Your code runs, but it runs somewhere else and is displayed through a window.
The practical consequences are worth knowing in advance, because each of them looks like a broken widget if you are not expecting it.
- The embed cannot grow to fit its content — it is the size of the box you drew.
- It does not inherit anything from your site's styling, because it is a separate document.
- Anything that needs to escape the frame — a lightbox that covers the page, a sticky bar — is confined to the box instead.
- The frame has its own scrollbar if the content overflows, which usually means you drew the box too small.
Getting the size right
Because the iframe will not resize itself, choose a layout with a predictable height before you paste: a fixed grid of a set number of rows, or a single-row slider. An 'infinite wall' layout is the wrong choice here, since its height depends on how many posts came back.
Then drag the box to fit and check it on a phone. Google Sites scales the frame down on narrow screens rather than reflowing what is inside it, so a wide grid becomes a small wide grid rather than a stacked one — a two- or three-column layout survives that far better than a six-column one.
If it still will not work
Check that you used the Embed code tab and not By URL. Check the account is public. Then check whether your widget requires a snippet with an id in it — a snippet pasted from an old tutorial without one will render nothing at all.
The fallback that always works is Instagram's own single-post embed, one post at a time, in the same Embed code box. It is more manual and heavier, but it has no dependency on how the widget behaves inside a sandbox.
Instagram Feed Widget
Show posts, reels and hashtags from Instagram on your site.
Also asked
- Can you add Instagram to Google Sites?
- Why won't my embed code work on Google Sites?
All of these have the same answer, so they share this page rather than each getting a near-identical one of their own.