# Safe embeds and iframes: add maps and tools without adding risk

URL: https://portfolio.wrxstack.com/blog/safe-embeds-and-iframes
Published: 2026-07-29. Last reviewed: 2026-11-15. By Folio Editorial.

An iframe is a window on your page that shows content from another address, such as a map or a calendar. To embed safely, use only trusted providers, prefer an allowlist of approved sources, run frames in a sandbox that limits what they can do, and never paste scripts you do not understand. Folio keeps only the embed address from pasted iframe code and discards the rest.

## Key takeaways

- An iframe displays another site inside yours, so you are trusting that site with part of your page.
- An allowlist limits embeds to sources you have approved, which blocks surprises.
- A sandbox restricts what a frame can do, such as running scripts or opening windows.
- Never paste a script from someone you do not trust, because scripts run with the power of your page.
- Folio keeps only the embed address from pasted iframe code, so extra attributes and scripts are not carried over.

## What an embed is, and why it is a trust decision

An embed lets you show something that lives elsewhere: a map of your shop, a video, a booking calendar or a form. The usual method is an iframe, which is a frame on your page that loads another address. Visitors see one page, but part of it is delivered by another service.

That has benefits. You do not have to build a map or a video player. It also means that the provider decides what appears in the frame, and may collect information about visitors who load it. If the provider is careless, hacked or malicious, your visitors feel the effect on your page.

So every embed is a small trust decision. Ask who runs it, what it loads and what it could do.

## Four ideas that keep embeds safe

These apply whatever platform you use.

- **Approve sources in advance**: Only allow embeds from providers you have chosen, such as a well-known map service. Anything else is refused by default.
- **Limit what a frame can do**: A sandboxed iframe is blocked from actions like running scripts, submitting forms or opening new windows unless you allow them one by one.
- **Do not paste unknown code**: A pasted script runs as part of your page and can read what visitors type, change the page or send data elsewhere.
- **Keep just the embed address**: The safe part of pasted embed code is usually the address. Extra attributes and inline code add risk without adding value.

## How Folio treats pasted embed code

Providers usually give you a snippet of HTML to paste. In Folio, when you paste iframe code, only the embed address is kept. Everything else in the snippet, such as extra attributes, styling tricks and any scripts, is dropped, and the page shows the frame in a controlled way.

For location, Folio supports a safely embedded Google Maps or OpenStreetMap map in your business details. The Embed block on a page is meant for the same kind of use, showing an approved source in a frame rather than running code from someone else.

The practical rule for you remains the same: only embed things from providers you trust, and remove embeds you no longer need.

## Before you add an embed

Run through these questions each time.

1. **Do you know the provider?** Use established services. Be careful with embed code sent by a stranger, a link from an email or a snippet from a forum.
2. **Do you need it?** A static photo and a link to the map can be enough. Every embed adds weight and risk.
3. **Is it only an address?** Look at the snippet. If it contains script tags or long strings of code, do not paste it. Ask for the plain embed address instead.
4. **What does the provider collect?** Read their privacy statement. Maps, videos and calendars may receive information about visitors, which can affect your own privacy notice. Check local law.
5. **Does it work on a phone?** Test on a small screen. A frame that is too wide or cannot be scrolled is a poor experience.
6. **Review it regularly.** Remove embeds that no longer serve a purpose, and re-check ones from providers whose terms or behaviour have changed.

## Red flags in embed code

Be suspicious of any snippet that includes a script tag, unfamiliar addresses, obfuscated text that looks like random characters or instructions to turn off security warnings. A request to paste code into your site in exchange for a prize, a plugin or an urgent fix is a classic scam.

If you inherited a site with embeds you do not recognise, remove them and see whether anything breaks. If you suspect your site has been tampered with, change your passwords, check who has access and ask your provider for help.

This is general guidance and not a guarantee of safety. For sensitive businesses, consult a qualified security professional.

## Embeds in real businesses

A cafe in Singapore needs a map. It uses a Google Maps or OpenStreetMap embed through the business details, shows the opening hours as text beside it and does not paste any additional code.

A tour operator in Rio wants a video on its page. It links to the video page rather than embedding it, to avoid third-party loading until a visitor chooses to watch.

A clinic in Manchester receives an email from a stranger offering a free booking widget and asking to paste a script. It declines. A script from an unknown source would run with full power on the page.

## Embed mistakes

- **Pasting scripts**: They run with the authority of your page.
- **Trusting unknown sources**: A free widget can be a way in.
- **Forgetting old embeds**: Providers close or change, and the embed breaks or worse.
- **Ignoring privacy**: Embeds may send visitor data to the provider.

## Embed review

1. **List every embed.** On every page.
2. **Check each provider.** Still trusted and in use.
3. **Prefer links.** When you only need to point somewhere.
4. **Test on mobile.** Frames must fit.
5. **Update your notices.** Policy and cookie notes match.

## Understanding what sandboxing does

A sandbox is a set of limits on a frame. By default a sandboxed frame cannot run scripts, submit forms, open pop-ups or reach into the page around it. Each ability has to be allowed on purpose, and the safest approach is to allow only what the embed truly needs.

This is why an allowlist and a sandbox work well together. The allowlist decides who may appear. The sandbox decides what they may do once they appear.

As a site owner you do not need to write this yourself, but knowing why it exists helps you choose platforms that apply these protections and refuse code that tries to bypass them.

## Questions and answers

**What is an iframe?**

An iframe is an element that shows another web address inside your page, like a window. It is commonly used for maps, videos and calendars.

**Is it safe to paste embed code from a provider?**

Embed code from a well-known provider is usually fine, but read it first. Do not paste anything that contains scripts you do not understand. Where possible, use only the embed address.

**What is an allowlist for embeds?**

It is a list of approved sources. Only embeds from those sources are allowed, and anything else is refused, which stops surprises.

**What does a sandboxed iframe do?**

A sandbox restricts what the frame can do, such as running scripts, opening windows or submitting forms, unless each ability is deliberately permitted.

**What does Folio do with pasted iframe code?**

Folio keeps only the embed address from the pasted code and discards the rest, including extra attributes and scripts.

**Can I show my location on a map safely?**

Yes. Folio supports a safely embedded Google Maps or OpenStreetMap map in your business details. You can also hide the street address if you prefer.
