大网数据广告活动
网站运营与故障问答

Will Google index and assign keyword value to content in closed accordion sections?

· 52CE 我爱测

I currently have an accordion with my content in on my pages. I know Google is starting to crawl websites in mobile and hidden content shouldn't be an issue at the moment but I'm mixing it up a little and wondering if Google will…

问题原文

原帖链接 · user3082823 · CC BY-SA 3.0

I currently have an accordion with my content in on my pages. I know Google is starting to crawl websites in mobile and hidden content shouldn't be an issue at the moment but I'm mixing it up a little and wondering if Google will still read the content and give it SEO value e.g.

  • Top Accordion - Open
  • Rest of Accordion - Collapsed

Should all the accordion be open for now?

已采纳解答

原帖链接 · Raul Reyes · CC BY-SA 3.0

Its really up to you and you don't need to worry about leaving the accordion open or closed.

Let's say that the content is hidden to the user, accordions uses JavaScript to hide or show the content, as long as the javascript is accessible to Googlebot you won't have any issue with your SEO, because Google can access Javascript code and understand that you are using it to hide the content and will be able to also parse or read the hidden content from the source code.

You need to check that your website robots.txt file is not blocking Google to understand that the hidden content is temporary. Go to yourdomain.com/robots.txt and make sure no folder or file containing the Accordion Javascript code is blocked like

User-agent: *
Disallow: /folder/accordion/javascript
or
Disallow: /javascript

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2018-02-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。