【问题标题】:How to stop Google from indexing or following anything inside a directory [duplicate]如何阻止谷歌索引或跟踪目录中的任何内容[重复]
【发布时间】:2017-05-09 15:44:27
【问题描述】:

我有 WordPress 网站和一个 iframe,其 src 是“http://my-website.com/www.downloadedwebsite.com/index.html”。我必须下载 iframed 网站,因为我正在修改其中的一些内容,并且需要同源。没有指向该 URL 的反向链接 - 只有一个 iframe src'ing 到它,但是,我看到 Google 已将它编入索引(糟糕!)。

如何阻止 Google 索引或关注“http://my-website.com/www.downloadedwebsite.com/”目录中的任何内容?

【问题讨论】:

    标签: php wordpress iframe googlebot nofollow


    【解决方案1】:

    Google 肯定还没有将框架内容与父页面相关联。所以你的pagerank不会受到影响。但是你可以从robots.txt中阻止它。

    在 robots.txt 中不允许该路径。

    用户代理:*

    不允许:/文件夹名称/

    【讨论】:

      【解决方案2】:

      您是否尝试过使用 robots.txt?

      对于单个页面,您还可以使用元标记

      <head>
      <meta name="robots" content="noindex">
      </head>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-07-01
        • 2018-04-22
        • 2023-03-26
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多