3

I am trying to find a lot on Google how to add Structured data to site and from all the tutorials I got an impression that there is RDF module in core which was supposed to do that work like providing structured data to search engines (Google).

That module is in core and already installed on site, still Google Search Console saying,

We do not detect any structured data on your site.

Am I missing something? If RDF does not provide structured data to search engines, what is the right method to add structured data to a site? Please, correct me if I am wrong about RDF.

6
  • What data are you trying to present to google and what's missing from the markup? Might just be that the theme you're using doesn't support it or hasn't implemented it properly/fully
    – Clive
    Jan 29 '17 at 14:50
  • Is the rdf module enabled? Do you have content that uses it? Google also much prefers to see metadata content in the main content area (for instance rich snippets).
    – mradcliffe
    Jan 29 '17 at 14:59
  • @Clive, Hi, I have not specifically added any data , how my question arised, as google console indicated that, there is no structured data on your site. So, in search to solve that I ended up at RDF module. So, if RDF is module answer which automatically generate Structured data then Google has to detect. My specific doubt is, Is RDF module creates Structured data? if yes, then I will have to find some other area which preventing structured data to be not detected by search engine.
    – CodeNext
    Jan 29 '17 at 15:15
  • Well sure, it does add the markup representing structured data in various contexts, but of course if you don't have any content then what are you trying to provide structured data for? I.e. what are you expecting to see, and what do you see instead?
    – Clive
    Jan 29 '17 at 15:19
  • @mradcliffe, Hi, that module is enabled. I am not sure how force content to use that, is there any tutorial to read? Yes, as per detail rich snippets is missing. From your comment, if metadata module is a way to add rich snippets, then I have to use that. I will look at that module.
    – CodeNext
    Jan 29 '17 at 15:38
3

If you enable the RDF module, Drupal will automatically output some RDFa for your content. You can use a RDFa parser to extract it, e.g., http://linter.structured-data.org/. If it doesn’t find any data (under "Raw structured data extracted from the page"), you are likely using a theme that doesn’t support it. Use a default/core theme for testing, you should see it then.

If you want to provide additional structured data for your content types and field content, you need to map the content types to suitable RDF types, and the fields to suitable RDF properties. If you care about SEO, you’ll likely want to use the types and properties from Schema.org, as the big search engines sponsor this vocabulary, and use it for things like rich search results.

One way to add these mappings is using the RDF UI module (which comes integrated with Schema.org).

2
  • Hi, you solved my doubt. I did check with that link, it is messaging, It showing "Raw structured data" for articles. Hence, wondering why google console is saying "No structured data found". Moreover, It was RDF UI module which was missing. As RDF core module have not provision of config or any such thing hence how can we customize? I think, RDF module in their help section should mention about RDF UI module or should be included in core with RDF. Thanks for answer.
    – CodeNext
    Jan 30 '17 at 4:02
  • 1
    @CodeNext: Google’s Structured Data Testing Tool is not a general parser/validator. It’s primarily used for checking the structured data for Google’s own features. -- However, the default mappings from the RDF module should show some output in Google’s tool. For example, if creating an "Article" node, it is of Schema.org’s type Article, has the name and dateCreated properties etc. -- all this is shown in the Google SDTT for me (if it only says "Detected", try copy-pasting your markup into the tool manually instead of entering the URL).
    – unor
    Jan 30 '17 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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