使用 CSS display:none 会对我的搜索引擎排名产生负面影响吗?
因此,假设我有通过 CSS 隐藏的合法内容,并且我使用 javascript 根据用户点击的内容有选择地显示它。此外,非 JavaScript 用户可以单击相同的链接,然后转到显示所请求内容的新页面。没有隐藏关键字或类似的东西。我有大约 15 个段落/小节的隐藏内容,可以通过单击链接或使用 JavaScript 来显示。
该内容被搜索引擎标记为将关键字放入隐藏内容中的可能性有多大,从而试图人为地提高我的排名?显然这不是我想要做的——所有隐藏的内容都可以被 javascript 和非 javascript 用户查看。不隐藏内容基本上需要重新设计我网站的整个部分,这是我想避免的。
作为记录,我已经对此进行了一些研究,我认为普遍的共识是,如果您隐藏合法内容,则无需担心。只是想获得一些其他意见,以及通过单击某些链接可以查看我隐藏的内容这一事实是否会有帮助。
So suppose I have legitimate content that's hidden through CSS, and I'm using javascript to selectively display it based on what the user clicks on. Also, non-javascript users can click on the same links and be taken to a new page with the requested content displayed. No hidden keywords or anything like that. I have about 15 paragraphs/mini-sections worth of hidden content that can be revealed by clicking links or using javascript.
How likely is it that this content will get flagged by search engines as putting keywords in hidden content, thus trying to artificially improve my ranking? Obviously this isn't what I'm trying to do -- all the hidden content can be viewed by javascript and non-javascript users. Not hiding the content would basically entail redesigning entire sections of my site, which I'd like to avoid.
For the record, I've done some research into this already, and I think the general consensus is that if you're hiding legitimate content you shouldn't have anything to worry about. Just wanted to get some other opinions and whether or not the fact that the content I'm hiding can be viewed by clicking on certain links will help at all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
为什么不让它在没有 JavaScript 的情况下为用户代理优雅地降级呢?
这样,在加载时,您的元素将通过 JavaScript 隐藏,然后在您需要时显示。
注意:您最好在此处使用跨浏览器兼容的onDOMReady事件,否则您的浏览器将在触发
onload
之前下载所有资源。Why don't you make it so it degrades gracefully for user agents without JavaScript?
That way, on load, your element will be hidden via JavaScript, and then shown when you want it to.
Note: You are better off using a cross browser compatible onDOMReady event here, otherwise your browser will download all assets before firing
onload
.关于这个主题有不同的答案,但隐藏元素通常被认为是“黑帽”搜索引擎优化 (SEO) 技术。 (请参阅此参考)Google 和其他搜索引擎已降低网站的排名或删除网站网站完全基于这样的结果。
您可能还想检查另外两个类似但不完全相关的 StackOverflow 问题:
There are mixed answers on this topic, but hidden elements are generally considered a "black hat" Search Engine Optimization (SEO) technique. (See this reference) Google and other search engines have lowered the ranking of sites or removed site altogether based on results like this.
You may also want to check these two other similar, but not entirely related, StackOverflow questions:
当然...使用隐藏文本(使文本和背景颜色相同)或隐藏 div 会导致您的网站评级下降。因为这是 Blackhat SEO 技术的一部分。一旦谷歌或任何搜索引擎发现它,他们就会从索引中删除您的网站或降低其排名。
Ofcourse...Using hidden text (giving text and background same color) or hiding a div will cause you website rating down. As this is part of Blackhat SEO technique. Once google or any search engine find it out, they will remove or rank down your website from its indexing.
不,绝对不是。
我还没有找到任何文档,但这完全是错误的,谷歌靠理解互联网和网页的工作原理为生,他们必须理解
display:none
或 <代码>可见性:隐藏。顺便说一下,查看他们的主页源代码,他们非常积极地使用上述资源。
不用担心,使用它,这很可能根本不会影响你的搜索引擎优化,或者在任何情况下,这将是一个臭名昭著的改变,特别是如果你正确地做了重要的事情!
祝你好运!
NO definitely not.
I haven't found any documentation yet but this would be completely off, Google makes a living out of understanding how the internet and the web pages work, and they DO have to understand that
display:none
orvisibilty:hidden
.By the way, check out their homepage source code they very actively use both mentioned resources.
Use it without fear, this will most likely not affect you SEO at all or in any case, this will be a infamous change, specially if you do the important stuff correctly!
Good luck!
我不相信 Google 等人检查元素的可见性,因为可靠地这样做是不可行的(想象一下您可以使用的所有定位和分层技术)并且以一种不会惩罚合法用途(如您的)的方式。我个人从未注意到它有任何问题,也从未发现谷歌员工的任何评论提到它。
所以我想说这是非常安全的。
I don't believe that Google et al check visibility of elements because it would be infeasible to do so reliably (imagine all the positioning and layering techniques you could use) and in a way that doesn't penalize legitimate uses (like yours). I've never noticed any problems with it personally, and I've never found any comments from Google employees mentioning it.
So I would say it's pretty safe.
根据我的经验,如果您隐藏内容,谷歌和其他搜索引擎就会对您进行评分。他们非常非常挑剔地向他们展示用户看到的相同内容。我开发了一个具有 Flash 页面的产品,我们出于 SEO 目的构建了非 Flash 页面(我们会嗅探,如果用户没有 Flash,我们会显示非 Flash 内容)。作为 SEO 合规性工作的一部分,我们必须确保非 Flash 上的所有内容与 Flash 完全相同。
It's been my experience that if you're hiding content, google and other search engines are going to rate you down. They are very, very picky about showing them the same content that users see. I worked on a product that had flash pages and we built non flash pages for SEO purposes (we'd sniff and if the user didn't have flash, we'd show the non flash stuff). As part of our SEO compliance stuff we have to make sure that everything on the non flash was exactly the same as the flash.
隐藏内容被视为黑帽 SEO 技术,如果 Google 发现任何可疑内容,可能会标记这些网站。以前,人们使用 CSS display: none 功能来隐藏关键字并填充它。这些不正当的做法在早期带来了排名的结果,但现在却不是这样了。随着更新的 Google 算法频繁推出,它已经变得足够复杂,可以检测任何不一致或黑帽 SEO 实践。因此,如果您有任何隐藏的关键字或尝试过关键字填充的做法,那么您应该小心,因为谷歌可能会标记该网站进行此类做法。
但是,如果您将其用于此处提到的真正目的,那么它应该不会影响您的 SEO 实践或其排名。您将能够采用可行的 SEO 技术并提高您的页面在 Google 的 SERP(搜索引擎结果页面)中的排名。
但是,即使存在合法内容,Google 也可能会将其视为黑帽技术并降低您的网站排名。如果是这样的话,你应该对结果的变化非常警惕,并且必须在为时已晚之前改变你的方式。
Hiding content is considered as a Black hat SEO technique and Google may flag those sites if they find anything suspicious. Back in days, people used CSS display: none feature to hide keywords and for stuffing it. Those illegitimate practices brought results in terms of ranking in early days, which isn’t the case now. With updated Google algorithms rolling out frequently, it has become sophisticated enough to detect any discrepant or black hat SEO practices. So, if you have any hidden keywords or have tried practice of keyword stuffing then you should be wary as Google may flag the site for making such practices.
However, if you have used it for genuine purpose as mentioned here, then it shouldn’t affect your SEO practice or its ranking. You will be able to adapt feasible SEO techniques and boost your page’s ranking in Google’s SERP (search engine result page).
But, Google might consider it as a black hat technique and rank down your site even if there is legitimate content. If that’s the case, you should be very wary of the changes in results and must change your ways before its too late.