All things Shopify and commerce
Hi guys.
I'm having a hard time making my store appear with its site title instead of domain on Google search.
The schema is implemented correctly as I've checked it on schema.org, I don't know what else I can do.
Also, the favicon is not displaying anymore. Please help me!
Solved! Go to the solution
This is an accepted solution.
Hi @dariusmuresan
Here is the structured data for the index page, collection page, product page, article, breadcrumbs
Create snippet json-ld and add below data then open theme.liquid before </head> paste this code {% render 'json-ld' %}
{% if template == 'index' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "{{ shop.url }}",
"potentialAction": {
"@type": "SearchAction",
"target": "{{ shop.url }}/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
{% elsif template == 'product' %}
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "{{ product.title | escape }}",
"image": [
{% for image in product.images %}
"{{ image | img_url: 'large' }}"{% unless forloop.last %},{% endunless %}
{% endfor %}
],
"description": "{{ product.description | strip_html | escape }}",
"sku": "{{ product.sku }}",
"mpn": "{{ product.id }}",
"brand": {
"@type": "Brand",
"name": "{{ product.vendor | escape }}"
},
"offers": {
"@type": "Offer",
"url": "{{ shop.url }}{{ product.url }}",
"priceCurrency": "{{ shop.currency }}",
"price": "{{ product.price | money_without_currency }}",
"itemCondition": "https://schema.org/NewCondition",
"availability": "{% if product.available %}https://schema.org/InStock{% else %}https://schema.org/OutOfStock{% endif %}",
"seller": {
"@type": "Organization",
"name": "{{ shop.name | escape }}"
}
}
}
</script>
{% elsif template == 'collection' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "CollectionPage",
"name": "{{ collection.title | escape }}",
"description": "{{ collection.description | strip_html | escape }}",
"url": "{{ shop.url }}{{ collection.url }}"
}
</script>
{% elsif template == 'article' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "{{ article.title | escape }}",
"image": "{{ article.image | img_url: 'large' }}",
"author": {
"@type": "Person",
"name": "{{ article.author | escape }}"
},
"publisher": {
"@type": "Organization",
"name": "{{ shop.name | escape }}",
"logo": {
"@type": "ImageObject",
"url": "{{ shop.logo | img_url: 'large' }}"
}
},
"datePublished": "{{ article.published_at | date: '%Y-%m-%d' }}",
"dateModified": "{{ article.updated_at | date: '%Y-%m-%d' }}",
"description": "{{ article.excerpt | strip_html | escape }}",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ shop.url }}{{ article.url }}"
}
}
</script>
{% endif %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "{{ shop.url }}"
}
{% if template == 'product' %}
,{
"@type": "ListItem",
"position": 2,
"name": "{{ product.title | escape }}",
"item": "{{ shop.url }}{{ product.url }}"
}
{% elsif template == 'collection' %}
,{
"@type": "ListItem",
"position": 2,
"name": "{{ collection.title | escape }}",
"item": "{{ shop.url }}{{ collection.url }}"
}
{% elsif template == 'article' %}
,{
"@type": "ListItem",
"position": 2,
"name": "{{ article.title | escape }}",
"item": "{{ shop.url }}{{ article.url }}"
}
{% endif %}
]
}
</script>
Hi @dariusmuresan
Google displays what it thinks is the page name. If nothing is recognized, the domain often is taken. Preferred, but not exclusively, is used
You can find more details here: https://support.google.com/webmasters/thread/209757987?hl=en&msgid=209773165
And here: https://developers.google.com/search/docs/appearance/site-names?hl=en
Hi Rishi and thanks for replying.
How do I correct "WebSite structured data (is a bit messy on your site)" ? I can code it myself just don't know how to do it.
This is an accepted solution.
Hi @dariusmuresan
Here is the structured data for the index page, collection page, product page, article, breadcrumbs
Create snippet json-ld and add below data then open theme.liquid before </head> paste this code {% render 'json-ld' %}
{% if template == 'index' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "{{ shop.url }}",
"potentialAction": {
"@type": "SearchAction",
"target": "{{ shop.url }}/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
{% elsif template == 'product' %}
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "{{ product.title | escape }}",
"image": [
{% for image in product.images %}
"{{ image | img_url: 'large' }}"{% unless forloop.last %},{% endunless %}
{% endfor %}
],
"description": "{{ product.description | strip_html | escape }}",
"sku": "{{ product.sku }}",
"mpn": "{{ product.id }}",
"brand": {
"@type": "Brand",
"name": "{{ product.vendor | escape }}"
},
"offers": {
"@type": "Offer",
"url": "{{ shop.url }}{{ product.url }}",
"priceCurrency": "{{ shop.currency }}",
"price": "{{ product.price | money_without_currency }}",
"itemCondition": "https://schema.org/NewCondition",
"availability": "{% if product.available %}https://schema.org/InStock{% else %}https://schema.org/OutOfStock{% endif %}",
"seller": {
"@type": "Organization",
"name": "{{ shop.name | escape }}"
}
}
}
</script>
{% elsif template == 'collection' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "CollectionPage",
"name": "{{ collection.title | escape }}",
"description": "{{ collection.description | strip_html | escape }}",
"url": "{{ shop.url }}{{ collection.url }}"
}
</script>
{% elsif template == 'article' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "{{ article.title | escape }}",
"image": "{{ article.image | img_url: 'large' }}",
"author": {
"@type": "Person",
"name": "{{ article.author | escape }}"
},
"publisher": {
"@type": "Organization",
"name": "{{ shop.name | escape }}",
"logo": {
"@type": "ImageObject",
"url": "{{ shop.logo | img_url: 'large' }}"
}
},
"datePublished": "{{ article.published_at | date: '%Y-%m-%d' }}",
"dateModified": "{{ article.updated_at | date: '%Y-%m-%d' }}",
"description": "{{ article.excerpt | strip_html | escape }}",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ shop.url }}{{ article.url }}"
}
}
</script>
{% endif %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "{{ shop.url }}"
}
{% if template == 'product' %}
,{
"@type": "ListItem",
"position": 2,
"name": "{{ product.title | escape }}",
"item": "{{ shop.url }}{{ product.url }}"
}
{% elsif template == 'collection' %}
,{
"@type": "ListItem",
"position": 2,
"name": "{{ collection.title | escape }}",
"item": "{{ shop.url }}{{ collection.url }}"
}
{% elsif template == 'article' %}
,{
"@type": "ListItem",
"position": 2,
"name": "{{ article.title | escape }}",
"item": "{{ shop.url }}{{ article.url }}"
}
{% endif %}
]
}
</script>
Thank you so much, I've implemented it as you instructed me. Hope this will help!
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025