Will using CSS display:none negatively affect my search engine ranking?
Asked Answered
P

7

5

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.

Polemic answered 4/2, 2011 at 4:35 Comment(1)
If you're more interested in the SEO perspective rather than other JS solutions, then this should be moved to webmasters.stackexchange.com.Martlet
D
6

Why don't you make it so it degrades gracefully for user agents without JavaScript?

(function() {

    var element = document.getElementById('some-element'),
        previousDisplay;

    window.onload = function() {
       previousDisplay = element.style.display;
       element.style.display = 'none';
    };

    document.getElementById('some-buton').onclick = function() {
        element.style.display = previousDisplay;
    }

})();

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.

Dynamotor answered 4/2, 2011 at 4:44 Comment(3)
I agree with alex. Setting it so that it shows if no JS enabled not only helps SEO, but it also helps those users that for some reason turn it off all together.Boogeyman
I thought about that, but the thing is, I'd like to make it look the same for non-JS users. If I'm having it visible by default, and hiding it with JS, then anyone without JS sees all of the content that's normally hidden, making the page quite messy. Also, I do have a way of making the content accessible to anyone without javascript (they have to reload the page though obviously).Polemic
@Polemic It all depends on context, and what you are hiding.Dynamotor
V
4

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:

  1. Google SEO and hidden elements
  2. SEO: does google bot see text in hidden divs
Vicky answered 4/2, 2011 at 4:47 Comment(1)
Thanks for the response. That's what I was afraid of. Most of the results I've come up with basically say this, but I haven't been able to find anything about exactly how much is too much hidden content, and what types of elements (if any) are more frowned upon than others. I'd imagine hidden <h1> tags are "worse" than hidden <div>s for example.Polemic
M
2

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.

Millibar answered 24/10, 2011 at 9:25 Comment(0)
K
1

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 or visibilty: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!

Kattiekatuscha answered 4/2, 2011 at 4:45 Comment(2)
Thanks for the encouragement! I've come across some very contradicting things, but yeah, given the commonness of hidden elements they're obviously not just blocking sites that do that from search results or anything.Polemic
@Polemic No problem, glad to help, this is in fact a controversial topic and you will have varied answers depending on who you ask, if you ask me, you should abuse this, and I think you should go for it without abusing!Kattiekatuscha
R
0

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.

Rabbinate answered 4/2, 2011 at 4:39 Comment(1)
Thanks for your input, I was hoping someone had some personal experience (or lack of experience) with this occurrence. Although I've heard from several sources that they're starting to parse CSS and javascript to a certain extent, so search engines can see what users see and all that.Polemic
P
0

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.

Procession answered 4/2, 2011 at 4:45 Comment(0)
P
0

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.

Presentday answered 28/2, 2020 at 13:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.