I have a page about a village named "San Felipe", and since I want it to have a richer snippet in search engines displaying its postal address, I decided to add to it some address details (including its postal code). I have read in the schema.org docs that PostalAddress
can be used on a Place
. I tested adding a name
for a PostalAddress
, and the search result preview in Structured Data Linter showed the value of the name
below the page link.
But when I also added values into the addressCountry
, addressLocality
, addressRegion
, and postalCode
, the name
disappears from the search results preview and is automatically replaced by the address properties mentioned above. So I am confused if the name
property is intended as a shorter way of adding a postal address, or if it should contain only the name of the main item (in this case, "San Felipe"):
<script type='application/ld+json'>
{
"@context": "http://schema.org/",
"@type": "AdministrativeArea",
"address": {
"@type": "PostalAddress",
"addressCountry": "country name",
"addressLocality": "city name",
"addressRegion": "region name",
"postalCode": "2800",
"name": "San Felipe, city name, region name, country name 2800"
},
"name": "San Felipe"
}
</script>
As seen in the screenshot below, the schema:name
of schema:address
("San Felipe, Santo Tomas, San Juan, Santiago") is ignored in the search results. However, it is displayed when I do not specify the addressCountry
, addressLocality
, addressRegion
, and postalCode
. So I am not sure of its purpose.
The Structured Data Linter just gives an example how a snippet could look like. For this purpose, the tool only shows selected properties. Whether or not the Structured Data Linter shows something in this snippet should never affect your decision which structured data to provide.
So if you think your PostalAddress
could benefit from a name
, provide it.
I am confused if the
name
property is intended as a shorter way of adding a postal address, or if it should contain only the name of the main item (in this case, "San Felipe")
Schema.org doesn’t define what the name
for a PostalAddress
should be. I think there are two common cases:
In the typical case, it would be the name which would also be used when addressing a piece of mail. This isn’t necessary the same name that’s specified on a parent item (if it has any). But even if it’s the same name, it can still make sense to provide it again for the PostalAddress
, because a consumer might not necessarily also take the parent item into account.
If specific properties (like addressCountry
etc.) can’t be used (e.g., because the CMS doesn’t output these in separate fields), you could provide everything you have in the name
.
(In that case, you could also consider to use address
with a string value, instead of a PostalAddress
item value.)
If it’s not the address of an organization or a person, and if you can provide all the necessary properties for each address part you provide, I would omit the name
property.