Hidden content and SEO
Last reviewed
Hidden content is fine for SEO when it is there for people: Google's spam policies say accordions, tabs, sliders and tooltips "don't violate our policies". It is spam when it is hidden "solely to manipulate search engines", such as white text on a white background. The real risk for most sites is different: content that loads only after a click is never fetched, because Google does not interact with the page.
What Google allows and what it does not
| Pattern | Google's view | Source |
|---|---|---|
| Accordion or tabbed content | Allowed: "Accordion or tabbed content that toggle between hiding and showing additional content" | Spam policies |
| Slideshow or slider | Allowed | Spam policies |
| Tooltip shown on hover | Allowed | Spam policies |
| Text only for screen readers | Allowed, when "intended to improve the experience for those using screen readers" | Spam policies |
| White text on white background | Hidden text abuse | Spam policies |
| Text behind an image or positioned off-screen with CSS | Hidden text abuse | Spam policies |
| Font size or opacity set to 0 | Hidden text abuse | Spam policies |
| A link on one small character, like a hyphen | Link abuse | Spam policies |
The difference is intent. Google defines hidden text abuse as content placed "in a way solely to manipulate search engines and not to be easily viewable by human visitors." A tab that people can open is viewable. Text nobody can see is not.
Google even suggests tabs on mobile: "Instead of removing content, consider moving content into accordions or tabs to save space."
Hidden content vs cloaking
They are different things.
- Hidden content is on the same page for everyone. People and crawlers get the same HTML, and some of it is collapsed.
- Cloaking is "presenting different content to users and search engines with the intent to manipulate search rankings and mislead users." Google's examples include "Inserting text or keywords into a page only when the user agent that is requesting the page is a search engine, not a human visitor."
Serving crawlers a rendered copy of the same page is not cloaking. Google says that "as long as your dynamic rendering produces similar content, Googlebot won't view dynamic rendering as cloaking." More in what is prerendering.
Hidden in the HTML vs loaded later with JavaScript
This is the part that decides whether Google sees the content at all.
| How the content is hidden | In the HTML Google renders? | Seen by Google? |
|---|---|---|
In the HTML, collapsed with CSS or <details> |
Yes | Yes |
| Rendered by JavaScript on load, then collapsed | Yes, after rendering | Yes, after rendering |
| Fetched from an API only when the tab is clicked | No | No |
| Loaded only when the user scrolls | No, unless it loads when visible in the viewport | Not reliably |
Google states it directly: "Google won't load content that requires user interactions (for example, swiping, clicking, or typing) to load", and "Google Search does not interact with your page." Lazy loading is fine if it "loads all relevant content whenever it is visible in the viewport."
<!-- Seen: content is in the HTML, collapsed until opened -->
<details>
<summary>Shipping and returns</summary>
<p>Orders ship within two business days. Returns are free for 30 days.</p>
</details>
// Not seen: content is fetched only after a click
button.addEventListener("click", async () => {
const res = await fetch("/api/shipping");
panel.innerHTML = await res.text();
});
To keep a tab interactive and visible to Google, put the content in the page on load and only toggle its visibility on click.
AI crawlers
The major AI crawlers do not run JavaScript (Vercel and MERJ, December 2024). For them, only content in the raw HTML exists. A collapsed <details> element in the server HTML is readable. A tab filled by JavaScript, even on load, is not. More on how AI crawlers see your site.
How to check your hidden content
- Raw HTML. Search for a sentence from inside a tab:
curl -s https://www.<your-domain>/product | grep -c "Returns are free"
1 or more means the text is in the HTML your server sends. 0 means it depends on JavaScript or a click.
- Rendered HTML. In Search Console, use URL Inspection, Test live URL, View tested page, and search the HTML for the same sentence. If it is missing, Google does not see it. Full steps in how to debug rendering problems.
- Free checker. Compare the page with and without JavaScript.
See what ChatGPT sees on your site
When Prebaked is the right choice
If your tabs and accordions are filled by JavaScript on load, crawlers that do not run JavaScript miss them. Prebaked renders the page in Chromium and serves the finished HTML to search engines and AI crawlers.
- The content is the same as for people. Prebaked does not add, remove or unhide anything.
- Content that loads only after a click stays missing. Prebaked does not click; fix those in the page.
- If Prebaked is slow or down, crawlers get your original page.
- One snippet to install: integrations.
FAQ
Is hidden content bad for SEO?
Not when it is there for people. Google's spam policies say accordions, tabs, sliders and tooltips do not violate its policies. Text hidden only to manipulate rankings, such as white on white, does.
Does Google index content in tabs and accordions?
Yes, if the content is in the HTML when the page loads. Content fetched only after a click is not loaded, because Google does not interact with the page.
Is hidden text the same as cloaking?
No. Hidden text is on the same page for everyone. Cloaking shows search engines different content than people, with the intent to manipulate rankings.
Is display: none bad for SEO?
Not by itself. What matters is the purpose. Collapsing content that people can open is a normal design pattern. Hiding text that nobody can reach, only for search engines, is hidden text abuse.
Do AI crawlers see content in tabs?
Only if it is in the raw HTML. The major AI crawlers do not run JavaScript, so tabs filled by JavaScript are empty for them.