javascript 如何使 iframe seo 友好?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17021063/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 06:48:31  来源:igfitidea点击:

How can I make an iframe seo friendly?

javascriptiframeseo

提问by ninjachicken1

I have a website which provides embeddable content in an iframe. I want search engines to see it so the site gets backlinks. To that end I'm planning to replace the content with a link to our site and a javascript button that changes the content back to the iframe. That way the pages using our widget load quicker as well. Does anyone have any idea how to do this?

我有一个在 iframe 中提供可嵌入内容的网站。我希望搜索引擎看到它,以便网站获得反向链接。为此,我计划将内容替换为指向我们网站的链接和一个将内容更改回 iframe 的 javascript 按钮。这样,使用我们的小部件的页面也会加载得更快。有谁知道如何做到这一点?

回答by Matthias Wegtun

You can index your iFrame trough robots.txt and google web master tools (add the URL of the iframe source to be crawled). This will only index the static page withouth the page around it. So it won't score high on the Search Engine Result page (as it misses too much, navigation usability).

您可以通过robots.txt 和google web master 工具索引您的iFrame(添加要抓取的iframe 源的URL)。这只会索引静态页面,而不会对它周围的页面进行索引。所以它不会在搜索引擎结果页面上获得高分(因为它错过了太多导航可用性)。

Since Google Penguin 2.0, links in iFrames might be treated differently as well.

从 Google Penguin 2.0 开始,iFrame 中的链接也可能被区别对待。

I suggest not using the iFrame if you aim for Search Engine Purposes, this will probably affect your search engine score more negatively than positivly

如果您的目标是搜索引擎,我建议不要使用 iFrame,这可能会对您的搜索引擎分数产生负面影响而不是正面影响

回答by lucky boost

Sorry can't post more then 2 links yet

抱歉还不能发布超过 2 个链接

a javascript button that changes the content

一个改变内容的javascript按钮

this you will need to test see what Matt Cutts has to say on the topic http://www.youtube.com/watch?v=Mibrj2bOFCU

这个你需要测试看看马特卡茨对这个话题有什么看法http://www.youtube.com/watch?v=Mibrj2bOFCU

回答by Liza

change <iframe></iframe>to <object></object>

更改<iframe></iframe><object></object>

change srcto data

更改srcdata

example :

例子 :

<object data="http://example.com/" title="My Title" width="640" height="270" style="border:none; overflow:hidden;"></object>

回答by Raptor

To make SEO friendly, avoid using IFRAME, as contents in IFRAME will NOT be indexed.

为了使 SEO 友好,请避免使用 IFRAME,因为 IFRAME 中的内容不会被索引。

Reference: http://moz.com/community/q/iframes-seo

参考:http: //moz.com/community/q/iframes-seo