【发布时间】:2010-04-14 13:33:04
【问题描述】:
我在我的网站中使用 iframe,
如何让搜索引擎机器人读取和索引内容,结果指向包含 iframe 的页面?
谢谢。
【问题讨论】:
标签: html iframe seo search-engine
我在我的网站中使用 iframe,
如何让搜索引擎机器人读取和索引内容,结果指向包含 iframe 的页面?
谢谢。
【问题讨论】:
标签: html iframe seo search-engine
据我从一些 Google 搜索中得知,搜索 iframe 中包含的文本只会返回 iframe 页面,而不是包装页面。所以 iframe 的内容没有被包装页索引。
如果可能,您应该尝试为 iframe 找到解决方法。如果您只需要“可滚动”内容,您可以使用带有 CSS overflow:scroll 的 div。或者只是从服务器端读取外部内容并将其包含在页面中。
【讨论】:
将javascript添加到iframe-content-page以检查它是否独立加载,如果没有则重定向到iframe-container-page:
if(self.location==top.location) top.location.replace('http://contain.er/page-url/here');
您可以选择(但我不推荐)将 iframe-content-page 添加到 robots.txt 并声明它不被索引:
用户代理:* 禁止:/iframe-content-page.html
【讨论】: