Skip to content
TryAR3D & AR for products

How to Embed a 3D Model in Your Website (Iframe Guide)

An iframe is the shortest path from a hosted 3D model to a live product page. It keeps the viewer isolated from the rest of your site, which is good for compatibility and bad for page speed if you load it too early. This guide shows the working pattern.

By · Updated

Iframe or JavaScript component?

A JavaScript component gives you more control, but it also asks your site to ship the 3D runtime. An iframe keeps that runtime inside the viewer's page. For a small brand or a one-off product page, the iframe is usually the lower-risk choice.

Use the component route only when you need deep integration, such as moving the camera from your own UI or syncing the model with a configurator.

Copy the embed from the product page

Open the TryAR product page and choose Embed. The dialog shows a live preview and an iframe snippet. The snippet points at the public embed URL, not at the seller's private upload path.

  • Keep the title attribute: it gives the frame an accessible name.
  • Set width to 100% and a fixed height that fits your layout.
  • Add loading=lazy so the viewer loads only when it approaches the viewport.
  • Do not remove the border style if you want the viewer to sit flush in a card.

Make it responsive

An iframe with width=100% and a fixed height is the simplest responsive pattern. Avoid percentage heights unless the parent has a real height; otherwise the viewer collapses. A 16:9 or 4:3 aspect ratio box is a reliable default.

On phones, leave enough vertical room for the model and the share controls. A viewer squeezed into a short frame is harder to rotate and harder to understand.

Protect page speed

The 3D runtime is large compared with a product image. Load it after the main product content, not before. If the viewer is below the fold, lazy loading is enough. If it is the hero, consider a click-to-load cover image so the first interaction is a deliberate choice.

Measure the page with and without the embed. If LCP or INP regresses, move the embed lower or load it on interaction.

Test the things that break

Open the page on a real phone and rotate the model. Check that the iframe does not trap scrolling, that the AR handoff appears only when supported, and that a missing model shows a useful error instead of a blank frame.

  • Test with a slow connection.
  • Test with the model blocked or unavailable.
  • Test keyboard focus inside the frame.
  • Check that the product link is visible outside the iframe.

Common questions

Can I embed a TryAR model on Shopify or WordPress?

Yes, anywhere you can paste HTML or use an iframe block. The viewer is a normal web page; it does not need a platform-specific plugin.

Will the embed be indexed by Google?

Embed pages are intentionally noindex. Search engines should index the main product page, not the iframe. Keep a visible link from the embedded page to the product URL.

Why does the iframe show a blank box?

The usual causes are a blocked third-party frame, a model that failed to load, or a height of 0 from a percentage height with no parent height. Check the console and set an explicit height.

Sources

5 min read