Kathy
Kathy

Reputation: 21

How to write up a correct schema object for Google search results? Structured Data JSON-LD Schema

I'm having trouble getting Google search results to display 'Site Name' and image.

My current schema object looks like:

<script type="application/ld+json">{
            "@context": "https://schema.org",
            "@type": "WebPage",
            "mainEntity": {
              "@type": "WebPage",
              "name": "The Site Name",
              "description": "A description of this website",
              "url": "https://someurlhere.com.au",
              "image": "https://url-to-icon/icon.png",
              "author":{
                "@type": "Organization",
                "name": "The Site Name",
                "url": "https://someurlhere.com.au"
              }
            }
          }</script>

I've looked through schema.org docs and have also validated it. It's just a basic website/webpage that doesn't require additional search or anything fancy.

The two main things I want to make work is:

  1. Adding a 'Site Name' about the url at the top (instead it is showing the url)
  2. Adding the correct image in the Google results.

However, when Google indexes the page, it always seems to be the url as the site name.

How I want my search results to look: How I want my search results to look

How my search results currently look: How they currently look

https://developers.google.com/search/docs/appearance/site-names.

Any help would be greatly appreciated!

Upvotes: 2

Views: 137

Answers (1)

Tony McCreath
Tony McCreath

Reputation: 3409

For site names, you want to focus on the Google's relevant documentation which you referenced. Which is to define a WebSite with a name and optionally alternateName.

For images, there's no one way to tell Google about what images you think are important for a page. Google has an article on that as well.

Following their documentation does not guarantee any rich snippets, but it does help point Google in the right direction.

Upvotes: 0

Related Questions