Is It Safe to Add the Google Maps iframe to My Landing Page?

I’m in the process of creating a landing page for my future portfolio using HTML and CSS. However, I have a question in mind regarding the use of Google Maps iframe in my code. Are there any security concerns or potential risks associated with this approach? If so, what are the best practices to mitigate them?

Here’s the code snippet I plan to use on my landing page:

<div id="location">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d31799276.28783339!2d-73.20733919293554!3d-13.365964655725687!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x9c59c7ebcc28cf%3A0x295a1506f2293e63!2sBrasil!5e0!3m2!1spt-BR!2sbr!4v1698285278081!5m2!1spt-BR!2sbr" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>

Thank you very much for your attention and patience. I’d greatly appreciate it if someone could provide a response.

Pretty safe security wise considering the source is well known, I guess a potential general risk to consider is google making an update at some point that breaks it by changing something about how they want people to embed the maps. You see some sites with embedded maps that google deprecated showing a warning, for example I found this pen w/ the warning: https://codepen.io/diana_aceves/pen/xxyJpr

The security concern people are usually worried about with iframes is other malicious sites embedding your page in them for things like phishing

3 Likes

Oh, thanks for your answer, Lucas. It was very clear.

2 Likes