The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Dangers of iframe?

    Dangers of iframe?

    Technical SEO Issues
    12 5 1.6k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • AlanMosley
      AlanMosley last edited by

      goodness knows why they do it

      But place this javascript in the page, and it will reload the page in the parent window, in short it will redirect to your page

      if(top.location.href!= window.location.href){
      window.parent.location.href = "yourURL" 
      }

      That will piss them off

      rasmusbang Lobtec MicahMMG 3 Replies Last reply Reply Quote 6
      • rasmusbang
        rasmusbang @AlanMosley last edited by

        THAT is post of the month for me...pure genious 😄

        AlanMosley 1 Reply Last reply Reply Quote 0
        • AlanMosley
          AlanMosley @rasmusbang last edited by

          Thanks Rasmus, i hope he does so and gets back to us wit there reaction.

          1 Reply Last reply Reply Quote 0
          • Lobtec
            Lobtec @AlanMosley last edited by

            Wonderful solution. Don't know why I didn't think about it myself. Thanks a lot!

            If anyone has the same problem and want the buster on all pages you can use:

            if (top.location!= self.location) { top.location = self.location.href }

            I only needed it for one page. Will be interesting to see how long they will feature us. One thing though, if the visitors of the other site has javascript disabled, this won't work.

            AlanMosley Lobtec 2 Replies Last reply Reply Quote 0
            • AlanMosley
              AlanMosley @Lobtec last edited by

              Let them have the 1% that don't

              1 Reply Last reply Reply Quote 0
              • Lobtec
                Lobtec @Lobtec last edited by

                heh. Good point 😉

                1 Reply Last reply Reply Quote 0
                • SamCUK
                  SamCUK last edited by

                  I have added google maps to my site in a iframe. Will that cause me seo problems?

                  AlanMosley 1 Reply Last reply Reply Quote 0
                  • AlanMosley
                    AlanMosley @SamCUK last edited by

                    no, but i wouldent put content you want to rank in a iframe

                    1 Reply Last reply Reply Quote 0
                    • MicahMMG
                      MicahMMG @AlanMosley last edited by

                      Amazing answer!

                      One question, though.  How will this come across on GA?  Will it show as a referral from the site with the iFrame?

                      Lobtec AlanMosley 2 Replies Last reply Reply Quote 0
                      • Lobtec
                        Lobtec @MicahMMG last edited by

                        Before the change I could see them under Traffic -> referral. I'm not sure how it will be shown now, I have to get back to you regarding that when I have gotten a couple of visitors.

                        1 Reply Last reply Reply Quote 0
                        • AlanMosley
                          AlanMosley @MicahMMG last edited by

                          Yes i bhlieve it will and since google follows javascript, it should be seen as a link

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post
                          • How to setup an iFrame to be indexed as the parent site
                            Don34
                            Don34
                            0
                            3
                            125

                          • What the hell that iframe is doing?
                            Travis_Bailey
                            Travis_Bailey
                            1
                            9
                            505

                          • Iframes, AJAX, JS, Etc.
                            0
                            1
                            86

                          • Adding content into an iframe
                            Chris.Menke
                            Chris.Menke
                            0
                            3
                            137

                          • Redirect a page intended for iframe
                            mememax
                            mememax
                            0
                            2
                            124

                          • External video content in iframe
                            PhilNottingham
                            PhilNottingham
                            0
                            6
                            237

                          • How to get SEO juice from a widget iframe?
                            A_Q
                            A_Q
                            0
                            8
                            4.2k

                          • Iframes & SEO
                            seopet
                            seopet
                            0
                            5
                            24.6k

                          Get started with Moz Pro!

                          Unlock the power of advanced SEO tools and data-driven insights.

                          Start my free trial
                          Products
                          • Moz Pro
                          • Moz Local
                          • Moz API
                          • Moz Data
                          • STAT
                          • Product Updates
                          Moz Solutions
                          • SMB Solutions
                          • Agency Solutions
                          • Enterprise Solutions
                          • Digital Marketers
                          Free SEO Tools
                          • Domain Authority Checker
                          • Link Explorer
                          • Keyword Explorer
                          • Competitive Research
                          • Brand Authority Checker
                          • Local Citation Checker
                          • MozBar Extension
                          • MozCast
                          Resources
                          • Blog
                          • SEO Learning Center
                          • Help Hub
                          • Beginner's Guide to SEO
                          • How-to Guides
                          • Moz Academy
                          • API Docs
                          About Moz
                          • About
                          • Team
                          • Careers
                          • Contact
                          Why Moz
                          • Case Studies
                          • Testimonials
                          Get Involved
                          • Become an Affiliate
                          • MozCon
                          • Webinars
                          • Practical Marketer Series
                          • MozPod
                          Connect with us

                          Contact the Help team

                          Join our newsletter
                          Moz logo
                          © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                          • Accessibility
                          • Terms of Use
                          • Privacy