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
How can I make an iframe seo friendly?
提问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
Links In IFrames Pass Value In Google http://www.seroundtable.com/google-iframe-link-14558.html
IFrame 中的链接在 Google 中传递值 http://www.seroundtable.com/google-iframe-link-14558.html
Confirmed: Google Passed Value From An Iframed Link http://www.highrankings.com/forum/index.php/topic/46890-confirmed-google-passed-value-from-an-iframed-link/
确认:谷歌从 Iframed 链接传递值 http://www.highrankings.com/forum/index.php/topic/46890-confirmed-google-passed-value-from-an-iframed-link/
回答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 src
to data
更改src
为data
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