Skip to content
Minesweeper
Google Sites β€” Minesweeper Embed Guide

Platform guide

How to Embed Minesweeper in Google Sites

Google Sites has a real embed-code field, so a Minesweeper board drops straight in β€” but the editor treats your iframe as a fixed box on a grid, and that is where most Google Sites embeds go wrong. Here is the exact path through the Insert panel and how to size the box so nothing gets clipped.

Time needed
About 2 minutes
Menu path
Insert > Embed
Tab to use
Embed code
Cost
Free, no plugin
Paste this into the Embed code box
<iframe
  src="https://play-minesweeper.games/embed/?size=beginner"
  width="316"
  height="437"
  frameborder="0"
  title="Minesweeper Game"></iframe>
<p style="font:12px/1.5 Tahoma,'MS Sans Serif',Geneva,sans-serif;color:#555555;margin:6px 0 0;max-width:316px">
  <a href="https://play-minesweeper.games/" style="color:#555555">Play Minesweeper</a> β€” free online Minesweeper, no download
</p>

The URL must be https://. Google Sites is served over HTTPS and browsers block insecure content inside a secure page, so an http:// address renders as an empty white rectangle with no error message.

Paste both parts. The paragraph after the iframe is the credit link that keeps the embed free β€” and on Google Sites specifically, see the note below about giving it a second home in a text box.

Inserting the game with the Embed dialog

  1. Copy the embed code from the generator

    Choose a board size and theme on the embed generator and copy the full snippet β€” the iframe plus the credit paragraph under it. Google Sites accepts complete HTML, so keep both intact rather than trimming it down to a URL.

  2. Open your page and click Insert

    Open the site at sites.google.com, select the page you want the game on, and use the Insert panel on the right-hand side of the editor.

  3. Choose Embed and switch to the Embed code tab

    Click Embed in the Insert panel. The dialog offers two ways to add content: a plain web address, or an Embed code tab for raw HTML. Select the Embed code tab.

  4. Paste the iframe and click Next, then Insert

    Paste the snippet into the code box and click Next. Google Sites fetches a preview of what it will render; if that preview shows the Minesweeper board, click Insert to place it on the page.

  5. Resize the box on the grid and publish

    The embed lands on the canvas as a resizable box. Drag its corner and edge handles until the whole board is visible without an inner scrollbar, then click Publish in the top-right corner to push the change live.

The box does not scale β€” size it deliberately

This is the difference between Google Sites and almost every other platform in this series. WordPress and Neocities render your iframe at the width you specify and let the page flow around it. Google Sites instead places the embed in a container on its layout grid, and the container's size is whatever you dragged it to. The page inside is never scaled to fit β€” anything that does not fit is simply scrolled.

So drag first, check second. Match the box to these dimensions:

  • Beginner 9×9 β€” 316 × 437 pixels. Fits any column, any section, any phone.
  • Intermediate 16×16 β€” 540 × 661 pixels. Fits a standard section on desktop; scrolls on phones.
  • Expert 30×16 β€” 988 × 661 pixels. Needs a full-width section and a laptop screen.

Give the box roughly 10 extra pixels of height beyond the number in the embed code. Google Sites' internal padding can otherwise shave the bottom row of cells off, and a player who cannot reach the last row cannot finish the board.

What the extra sandbox layer changes

Everything you insert through Embed code is rendered inside a frame that Google Sites itself controls, which means your iframe ends up nested one level deeper than you wrote it. In practice:

  • Gameplay is unaffected. Left-click to reveal, right-click to flag and double-click to chord all work, because the game suppresses the browser context menu itself.
  • Permission attributes may be dropped. Features requested through allow="...", such as clipboard access for sharing a finished board, can be filtered out by the wrapper.
  • Nothing you paste can touch the rest of your site. That is the point of the sandbox, and it is also why Google Sites is a safe place to host a third-party game.
  • A blank white box means the source refuses framing. If you try this with other sites you will hit that often; this embed page is built to be framed, so a blank box here almost always means a typo in the URL.
  • The credit line lands inside the sandbox too. Anything you paste into the Embed code box is rendered in that inner frame rather than as part of your page's own markup. Keep it there β€” but on Google Sites it is worth also dropping a plain Text box directly under the embed with the same link in it, so the credit sits in the page itself where a reader (and a search engine) actually meets it. One line is enough: "Minesweeper by play-minesweeper.games", with the words linked.

Classroom and intranet notes

A large share of Google Sites pages are classroom sites, club pages and internal team hubs, and a Minesweeper board suits all three: it needs no login, saves nothing, makes no sound and finishes in under a minute on the Beginner board.

Two things to check before you publish to students. First, publish scope: the Publish dialog lets you restrict the site to your organisation, and an embed behaves the same either way. Second, network filtering β€” school networks that block game domains wholesale will block the frame too, and the page will show an empty box. Test on the school network rather than at home. If the game is blocked, our notes on playing Minesweeper at school cover what usually gets through.

For a puzzle that is quick enough to finish in a break, generate the code with a smaller custom board, for example ?size=8x8&mines=8, which fits comfortably in a sidebar section of a class page.

Google Sites embed questions

Why does my Google Sites embed have scrollbars around the game?
Google Sites gives every embed a fixed-size box and does not scale the content inside it. If the box is smaller than the iframe’s width and height, you get scrollbars instead of a smaller board. Drag the box until it is at least as large as the dimensions in the embed code β€” 316 by 437 pixels for the Beginner board.
Does this work on a school or work Google Workspace account?
Usually yes, but a Workspace administrator can restrict what Google Sites is allowed to embed for managed accounts. If the Embed option is missing from the Insert panel, or the preview stays blank for every URL you try, that is an admin policy rather than a problem with the code β€” a personal Google account will work normally.
Can I make the game full width in Google Sites?
Set the section to a full-width layout in the section toolbar, then drag the embed box wider. The standard Google Sites content area is roughly 1000 pixels, so the Expert 30x16 board at 988 pixels only fits on a full-width section viewed on a laptop or larger.
Do visitors need a Google account to play?
No. The game itself needs no account. Whether a visitor can see the page at all depends on your own sharing settings β€” a site published to "Anyone on the internet" is playable by anyone with the link.
Why does the copy-your-result button not work inside Google Sites?
Google Sites wraps whatever you paste inside its own sandboxed frame, and permission attributes such as allow="clipboard-write" do not always survive that extra layer. Playing, flagging and restarting all work normally; only clipboard actions may be blocked. Readers can still open the game in a new tab to share a result.
How does the embed behave on phones?
Google Sites shrinks the box on narrow screens but does not reflow the embedded page, so a wide board becomes a small scrollable window. Use the Beginner 9x9 board on any site with meaningful mobile traffic, and preview with the phone icon in the editor toolbar before publishing.
Get your embed code

Everything on this page starts with a snippet from the generator: a game frame plus a one-line credit link that goes under it. Pick a board size and theme, decide whether to show the optional "Powered by" line inside the game, then copy the code.

Open the Minesweeper embed generator