How should you handle content that needs to be hidden or is no longer needed?
First determine whether the content still needs to be shown, then decide whether to hide or remove it. If it should simply be hidden on certain devices or until the user expands it, the supplied discussions support using display:none as needed. If it will never be shown again, consider removing it from the content or HTML output. If you are retiring an entire page, you also need to assess whether to update or delete it and what redirects may be appropriate, rather than simply hiding it from view. These sources do not establish that any approach is guaranteed to be free of SEO risks.
Do not rule out display:none for content that will be shown again
A participant on Webmasters Stack Exchange noted that display:none has legitimate uses and should not itself be equated with bad practice (S1). Another response cited a “show/hide” button as an example of an interaction for which it is suitable (S16). The key consideration is the content’s purpose, rather than automatically replacing any styling that hides it.
- Content that expands after a user action is temporarily hidden, not marked for deletion.
- Content relevant only to certain devices can be shown or hidden according to layout needs. Welly’s 2022 article also mentions hiding elements in responsive design to reduce visual clutter (S4).
However, these examples are not current official assurances from search engines. The sources also provide insufficient evidence that using negative offsets or covering content with layers would be safer. Switching directly to another hiding technique simply to avoid display:none is therefore not advisable.
For elements that will never be needed, address the source of the output first
If you have confirmed that an element never needs to be displayed under any circumstances, the issue goes beyond layout. The discussion in S10 recommends removing the content from the website’s output rather than continuing to hide it with CSS. For example, if unwanted content comes from a WordPress plugin, you could check the plugin’s settings, remove the plugin, or adjust the output with custom PHP. These are options proposed in that discussion, not a fixed process that every website must follow.
S13 does mention that, when using a CMS, someone might hide a small amount of markup to save time. However, this is merely an example of a situation, not evidence that hiding content for convenience is guaranteed to have no SEO impact. Saving editing time and deciding whether content should continue to exist are two separate considerations.
When an entire page is no longer needed, classify it first, then clean up links
In its 2023 article on content audits, Semrush classifies content into three categories: keep, update, and delete (S9). This addresses different content decisions more effectively than simply hiding all old content:
- Still relevant and performing well: keep it.
- Outdated but still valuable, or with room for improvement: update it.
- No longer needed or not worth updating: consider deleting it, such as old event content that no longer serves a purpose.
When a page becomes unavailable, distinguish between accidental deletion and deliberate retirement. Another 2023 Semrush article recommends restoring accidentally deleted pages. Old pages that are no longer needed can be redirected to relevant pages on the same site, while internal links pointing to the old pages should be removed or updated (S6). “Relevant” is an important condition here: this advice should not be extended to mean that all deleted pages should redirect to the homepage.
Hiding and removing content: perspectives from across the web
Does a hidden element still occupy its original space in the layout?
When display:none is used, the element and its children do not appear in the render tree and are removed from the normal document flow. If you need to preserve the original layout space, you cannot treat it as a way to make something “invisible but still taking up space.” First check whether the resulting layout changes meet your needs.
Does the text for a logo image need to be hidden separately with CSS?
One participant recommends putting the logo text in the image’s alt attribute rather than hiding separate text with CSS, because alt is intended for image alternatives. This advice applies to text descriptions of logo images. Although the participant believes alt may help with SEO, the sources do not provide enough evidence to guarantee that using it will improve rankings.
How should you review which content to keep when migrating a website?
Before migrating, you can create a content map and then classify the content according to your post-migration content goals. Neil Patel’s 2024 article proposes the “6 Rs”: reformat, repurpose, refresh, retire, redirect, or retain. For outdated, duplicate, or irrelevant content, consider updating it, redirecting it to another page, or retiring it. For content worth keeping, you can improve the user experience and accessibility.
How should you handle visitors arriving from outside the site when a broken URL is no longer needed?
Besides cleaning up internal links to broken URLs, consider visitors arriving through bookmarks or external links. Semrush’s 2022 article recommends setting up appropriate redirects for removed, broken URLs so these visitors have somewhere to go. Check that the destination is appropriate rather than assuming that any destination is equally useful.
References
- Can tabs of content be made SEO friendly?webmasters.stackexchange.com — Source used in the article above.
- RWD響應式WebsiteWhat does it mean?5大響應式網頁模板+RWD網頁範例welly.tw · 2022-02-23T06:30:08.853Z — Source used in the article above.
- How bad is it to use display: none in CSS?webmasters.stackexchange.com — Discusses: Does the text for a logo image need to be hidden separately with CSS?
- What is technical SEO? Basics and best practiceswww.semrush.com · 2023-02-01T15:56:00Z — Source used in the article above.
- Neil Patel’s Website Migration Checklistneilpatel.com · 2024-08-12T19:00:00+00:00 — Discusses: How should you review which content to keep when migrating a website?
- How bad is it to use display: none in CSS?webmasters.stackexchange.com — Discusses: Does a hidden element still occupy its original space in the layout?
- A Guide to Choosing an Enterprise SEO Platformwww.semrush.com · 2023-08-08T08:17:00Z — Source used in the article above.
- How bad is it to use display: none in CSS?webmasters.stackexchange.com — Source used in the article above.
- What Is a 404 Error? How It Affects SEO & How to Fix Itwww.semrush.com · 2022-10-31T13:27:00Z — Discusses: How should you handle visitors arriving from outside the site when a broken URL is no longer needed?
- How bad is it to use display: none in CSS?webmasters.stackexchange.com — Source used in the article above.
- How bad is it to use display: none in CSS?webmasters.stackexchange.com — Source used in the article above.


Join the discussion 0 comments
What are you working through? Share a question or experience and let’s find the next step.
No comments yet. Start the conversation.