I have schema dot org markup on my website. But I also have an alternate language; each of my pages has a French version in a different page with proper hreflang tags.
Google's instructions don't really mention different languages, neither does schema dot org. For example, I have an "Organization" schema set up on the homepage. Do I need to translate it on the French homepage or leave it in English, and if so, do I change the URL to point to the French homepage as well? Wouldn't this cause Google to think there are two different organizations? Same question would apply to schemas like "Product".
hreflang not directly related to schema.org (That's why you didn't find any references on google/schema.org).
Schema.org is a set of extensible schemas that enables webmasters to
embed structured data on their web pages for use by search engines and
other applications. https://schema.org/
VS
Hreflang specifies the language and optional geographic restrictions
for a document. Hreflang - Google Support. The hreflang attribute on each page should include a reference to itself as well as to all the pages that serve as alternates for it https://moz.com/learn/seo/hreflang-tag.
Two pages example
**microdata (Same idea for JSON-LD). And the same idea to any schema.
Your English version
/en/about
<div itemscope itemtype="http://schema.org/LocalBusiness">
<h1><span itemprop="name">Hello World</span></h1>
<p itemprop="description">A superb collection of fine gifts and clothing
</div>
hreflang:
<link rel="alternate" href="http://example.com/en/about" hreflang="en" />
<link rel="alternate" href="http://example.com/fr/about" hreflang="fr-fr" />
Your French version
/fr/about
<div itemscope itemtype="http://schema.org/LocalBusiness">
<h1><span itemprop="name">Bonjour le monde</span></h1>
<p itemprop="description">Une superbe collection de beaux cadeaux et vêtements
</div>
hreflang:
<link rel="alternate" href="http://example.com/en/about" hreflang="en" />
<link rel="alternate" href="http://example.com/fr/about" hreflang="fr-fr" />
itemprop="name" above give extra semantic data about your LocalBusiness - each page use another language (Specify by Hreflang).
One of google guideline is:
Don't mark up content that is not visible to readers of the page. For
example, if the JSON-LD markup describes a performer, the HTML body
should describe that same performer. https://developers.google.com/search/docs/guides/sd-policies
Not official google answer about this topic - but its better to translate the JSON-LD data as well. By Wordpress or other CMS, it should be easy to pull the data.
Anyway, JSON-LD not related to site indexing (like hreflang -or- canonical). There is no need to change a URL because of a schema. You find reports (status/errors/rich results) about your schema under google search console - docs her.
Live example (From nike site):
English schema (rich card preview):
Data Testing tool
French schema (rich card preview):
Data testing tool
Follow the structured data guidelines of Google requires:
Relevance
Your structured data should be a true representation of the
page content.
as well as further
Location
Put the structured data on the page that it describes, unless
specified otherwise by the documentation. If you have duplicate pages
for the same content, we recommend placing the same structured data on
all page duplicates, not just on the canonical page.
Thus, if the information on your home page has a separate web page with duplicate content in French, then using structured data, you MUST set the content for data in French.
This is completely justified in terms of semantics. Google uses structured data to search for entities with API Google Knowledge Graph, for rich search results, for voice search, for machine learning. It is obvious that users using French in a web search is willing and will receive search results in French.
Related
I try to get a simple business address which I structured after the https://schema.org/PostalAddress Example 2:
<div class="place" itemscope itemtype="https://schema.org/Organization">
<p>
<span itemprop="name">Organisation</span>
</p>
<p itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="streetAddress">Stationstreet 1</span>
<span itemprop="postalCode">8596</span> <span itemprop="addressLocality">Arbon</span>
</p>
</div>
If I let google test rich results test this it claims that no data was detected. If I test on (https://validator.schema.org) it proofs to contain a proper address.
Is this a mistake on my end or shouldn't I trust Google's test here?
The purpose of Google’s Rich Results Test tool is showing/validating structured data that conforms to their own Rich Results. Rich Results are features in Google Search (typically for displaying a search result in a different way), which make use of certain Schema.org schemas. This means the tool only considers a very small subset of what is possible to describe with Schema.org.
You can see this in action if you replace your Organization type with the subtype LocalBusiness (just for testing; if your organization is not a local business, don’t publish it like that). The tool will detect an item then, because Google has a rich result for local businesses.
I have been trying to find the best way to link two items together using RDFa, specifically linking a Person to multiple SoftwareApplication entries.
The way I currently do this on the author page is:
<div class="container text-center" vocab="http://schema.org/" typeof="Person">
...
<span property="hasOfferCatalog" typeof="OfferCatalog">
<meta property="numberOfItems" content="10" />
<span property="itemListElement" typeof="CreativeWork">
<meta property="name" content="Project Name" />
<meta property="url" content="https://www.my-domain.tld/ProjectName/" />
</span>
...
As above the project is actually a SoftwareApplication, and the URL has a complete RDFa/Schema.org definition of it, but if i put:
typeof="SoftwareApplication"
on the author's page then, kind of expectedly, Google's Structured Markup validator throws errors about required values not being present for it, CreativeWork throws no errors but is less specific. I don't really want to repeat the entire SoftwareApplication metadata everywhere the project is referenced, I'd rather just say "go look at this URL".
What is the correct/best way to cross reference the SoftwareApplication pages from the author page? in the project the reverse reference is easy as there is an Author attribute, which can be of type Person, which is acceptable with just name and URL.
Once I know the correct RDFa way of referencing I'll apply the tags to content in the page rather than using meta tags.
To link items together, you need a suitable property. Like author (to state which Person is the creator of the SoftwareApplication), or like hasOfferCatalog (to state which SoftwareApplication is offered by the Person).
Inverse properties
In most cases, Schema.org defines its properties only for one direction. So there is only author, and no authorOf. If you need the property for the other direction, you can use RDFa’s rev attribute.
Linking instead of repeating
If you don’t want to repeat your data (i.e., only define it once and link/refer to this definition instead), you can provide a URL value. Schema.org allows this for all properties, even if URL is not listed as expected type. If you want to follow Semantic Web best practices, give your entities URLs (as identifiers) with RDFa’s resource attribute, and use these URLs as property values to refer to the entities.
For this, simply use one of the linking elements (e.g., elements with href or src attribute).
Example
Using the author case as example:
<!-- on the page about the software: /software/5 -->
<div typeof="schema:SoftwareApplication" resource="/software/5#this">
Author:
<a property="schema:author" typeof="schema:Person" href="/persons/alice#i">Alice</a>
</div>
<!-- on the page about the person: /persons/alice -->
<div typeof="schema:Person" resource="/persons/alice#i">
Authored by:
<a rev="schema:author" typeof="schema:SoftwareApplication" href="/software/5#this">Software 5</a>
</div>
Errors in Google’s SDTT
If the Structured Data Testing Tool gives errors about missing properties, note that it doesn’t mean that something is wrong with your markup. Schema.org never requires a property.
It just means that these properties are required for getting a certain Google search feature. So ignore these errors if you don’t want to get the feature (or if you can’t provide all required properties).
Thank you for the other response, I'll have a read over the linked resources, I have also found a solution to the specific case in my question.
Google Search Console has a page on Carousels which shows that you can use ListItem, which only "needs" URL, to populate the hasOfferCatalog property. E.g.
<span property="itemListElement" typeof="ListItem">
<meta property="position" content="1" />
<meta property="url" content="https://www.my-domain.tld/ProjectName/" />
</span>
I have a Place/Local Business that has various fields that map quite nicely to schema.org entries. There is one field I'm not sure how to mark up though. We have links to social media accounts for the business such as their Twitter account, Facebook Page and Pinterest account. How should these be marked up in schema.org?
There is a proposal for a socialAccount property (and another one), and an older discussion about an account property. The relevant issue on Schema.org’s GitHub is Social account proposal (no comments yet).
But these properties are not there yet (if they’ll come at all).
Of the currently available properties, url, sameAs, and contactPoint come to mind:
url could be used if that’s the (only) URL of the entity
sameAs could be used if the social media account represents/identifies exactly the same entity (organization, person, etc.)
contactPoint could be used if the social media account allows contacting the entity
<div itemscope itemtype="http://schema.org/Organization">
<link itemprop="url" href="http://www.your-company-site.com">
<a itemprop="sameAs" href="http://www.facebook.com/your-company">FB</a>
<a itemprop="sameAs" href="http://www.twitter.com/YourCompany">Twitter</a>
</div>
https://developers.google.com/webmasters/social-markup/
Google definitely uses these meta tags. I tested a page here and when added, the tool picked up the data..... so the og (Open Graph) tags are very important for Google search.
Therefore we need to understand them thoroughly. However, visiting ogp.me and loading their specification page produces a blank page (whats going on there I wonder)?
Their single info webpage tells us:
The following properties are optional for any object and are generally recommended:
og:locale - The locale these tags are marked up in.
Of the format language_TERRITORY. Default is en_US.
og:locale:alternate - An array of other locales this page is available in.
They give us an example:
<meta property="og:locale" content="en_GB" />
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:locale:alternate" content="es_ES" />
The theory on the web is that 'locale' determines the region the document is applicable to (available in), and 'alternate' provides additional document applicable regions.
However, for a great number of sites, this seems to be a disaster in waiting.
One chap on Bing SEO claimed that for 'locale' anything other than en_US would kill your doc distribution (globally), yet what then of French, Spanish, German, Japanese etc.
My site has translation enabled and its content is genuinely applicable to a global audience.
Am I to list the entire array of languages.... and by doing so, risk accusation of 'spamming regions'?
We have no in depth explanation of these tags, yet they seem too important to guess at.
Does anybody have knowledge of the fundamentals, so that we can code our sites correctly?
These tags are for Facebook only. This has no effect on Google. They have their own recommended was for handling locale and languages.
http://googlewebmastercentral.blogspot.com/2011/12/new-markup-for-multilingual-content.html
http://googlewebmastercentral.blogspot.com/2010/03/working-with-multi-regional-websites.html
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=182192
I'm having a bit of a problem getting rich snippets shown properly on the testing tool for my site (I understand that Google can take some time / decisions as to if a result shows up on the actual site).
Here's an example Google Rich Snippets Result for one of my pages:
http://www.google.com/webmasters/tools/richsnippets?url=http%3A%2F%2Fwww.makemeacocktail.com%2Fcocktail%2F6741%2Fcosmopolitan%2F
Which is for this url:
http://www.makemeacocktail.com/cocktail/6741/cosmopolitan/
Everything looks good - but for some reason no image is shown with the example result. I'm a bit confused here. I have the correct meta tag in place:
<meta itemprop="image" content="http://images.makemeacocktail.com/cocktails/6741/cosmo_4.jpg" class="photo" />
But no image shown in the testing tool result?
As a side - is there anything else that needs including? It does seem to have everything that is required, but can't seem to get the image shown properly.
Not entirely true ... but it did lead me to the solution. For completeness here and if anyone wants to know a little more .....
I was using:
itemscope itemtype="http://schema.org/Recipe"
Where as google in their example pages:
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=173379
Uses:
itemscope itemtype="http://data-vocabulary.org/Recipe"
Note the different itemtypes. Image was the correct itemtype for schema.org (not for data-vocabulary.org). If I changed my meta tag from:
<meta itemprop="image" content="http://images.makemeacocktail.com/cocktails/6741/cosmo_4.jpg" class="photo" />
to
<meta itemprop="photo" content="http://images.makemeacocktail.com/cocktails/6741/cosmo_4.jpg" class="photo" />
Google threw up errors that itemprop="photo" wasn't recognised in the schema.org.
The actual reason my page wasn't showing up a photo in the search results was because I had also used Microdata (I was using the Microdata hrecipe. Schema.org is a Microformat by the way).
My Microdata for the page was correct, but the class="photo" that is needed for Microdata was on a meta tag, where as it turns out you actually need the class="photo" on an actual 'img' tag for google to recognise it.
This also leads on to show that Google actually reads Microdata before Microformat - and gets me wondering whether having both on one page is useful at all. Ie Google was not recognising my correct schema.org image meta tag if hrecipe was present and the photo class not applied properly. So I wonder if Google use the Microformat information at all if Microdata is present.
A couple of open ended questions, but also the answer to the initial question. Hope that helps someone else in the future.
The image property in the recipe markup is called photo and not image:
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=173379
Try replacing itemprop="image" with itemprop="photo" and you should be all set.