2

I want to add some piece of data to rich snippets (for example, breadcrumps), but this information is not visible on the page (for example, because the designer has not yet prepared the sketches)

Is there a way to tell search engines to index this data?

3 Answers 3

2

Google does not use rich snippet data that isn't visible on the page to users. From their help page:

In general, Google won't display any content in rich snippets that is not visible to human user. Don't hide the content that you have marked up for rich snippets using techniques like display:none, value-title, or css. Google will ignore content that isn't visible to human users, so you should mark up the text that visitors will see on your web pages.

EDIT: Google seems to have relaxed this policy somewhat. They now say that marked up data should not be hidden from users, but allow for cases where the markup can't be applied to text visible in the HTML. Their guidelines now say:

Markup should not be used to hide content not visible to users in any form, since it might create a misleading or deceptive search experience. For example, if the JSON-LD markup describes a performer, the HTML body should describe that same performer.

Google is still likely to ignore any data that it doesn't think is visible to users. The best way to get Google to pay attention to marked up data is to mark up data that is visible to users. In cases where Google feels you are being deceptive about this, they may penalize your site in the Google rankings.

2
  • Seems to be obsolete. Can't find the mentioned content on the link.
    – user2930
    Dec 12, 2016 at 18:43
  • @FahadUddin good catch. I have updated the answer based on the new wording in their documentation. Dec 12, 2016 at 18:50
1

JSON-LD

is the alternative way of doing things. A bonus can be that it does not polute your HTML. Example:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Restaurant",
  "address": {
    "@type": "PostalAddress",
    "addressLocality": "Sunnyvale",
    "addressRegion": "CA",
    "postalCode": "94086",
    "streetAddress": "1901 Lemur Ave"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4",
    "reviewCount": "250"
  },
  "name": "GreatFood",
  "openingHours": [
    "Mo-Sa 11:00-14:30",
    "Mo-Th 17:00-21:30",
    "Fr-Sa 17:00-22:00"
  ],
  "priceRange": "$$",
  "servesCuisine": [
    "Middle Eastern",
    "Mediterranean"
  ],
  "telephone": "(408) 714-1489",
  "url": "http://www.dishdash.com"
}
</script>
1
  • I do not recommend my own answer, since Google did not index anything from JSON-LP
    – Dan
    Jun 24, 2014 at 20:13
1

I recommend 2 techniques that worked in 100% cases for me (tested Google, Yahoo, Bing, Yandex).

First - meta tags:

<meta itemprop="xxx" content="yyy">

Second - hide using position:absolute, z-index, negative margins or similar things:

<span itemprop="xxx" style="position:absolute;top:-20000px"> yyy </span>

Second is more complicated but works if you want to put some hierarchical data (with many nodes in it)

Second method seems to be working vey good for black SEO with Google and others. I did not expect this in 2014, really.

1
  • Have you read stephen answer, Google can drop your snippet any time, if you hide it from human visitors.
    – Goyllo
    Dec 12, 2016 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.