Fixing 'Missing Field Author' in Google's Rich Results Test

Close-up of colorful syntax-highlighted code on a screen, representing debugging structured data

Photo by Godfrey Atima

On this page

You run a post through Google’s Rich Results Test and the Article and BreadcrumbList blocks both come back valid, but there’s a note sitting under Article: “Missing field ‘author’ (optional but recommended).” The page visibly shows a byline. So why is Google saying the field is missing?

Why this happens

A byline you can see on the page and an author field in the page’s structured data are two unrelated things. Rich results are read from a <script type="application/ld+json"> block, not from the rendered HTML, so a page can display “By Jane Doe” in plain text while emitting no author property in its JSON-LD at all, and the two will never be reconciled automatically. This is exactly what happens on a lot of Astro blogs: the visual layout was built first, structured data was never added, and everything looks correct until you check what Google actually parses.

The Article type’s author property expects a Person (or Organization) object with, at minimum, a name. Google also recommends a publisher (an Organization with its own name and logo) since that’s what ties the article to the site as a whole rather than just the individual page.

The fix

Build the JSON-LD from the same data already driving the page (the post’s frontmatter and the site’s config) rather than hand-typing it per post. In an Astro layout:

src/layouts/BaseLayout.astro
---
const jsonLd = {
  "@context": "https://schema.org",
  "@type": "Article",
  headline: title,
  datePublished: date.toISOString(),
  author: {
    "@type": "Person",
    name: siteConfig.author.name,
    url: `${siteConfig.url}/about/`,
  },
  publisher: {
    "@type": "Organization",
    name: siteConfig.name,
    logo: {
      "@type": "ImageObject",
      url: `${siteConfig.url}/logo-mark.svg`,
    },
  },
};
---

<script type="application/ld+json" set:html={JSON.stringify(jsonLd)} />

Two details matter here. First, author links to a real URL (typically an About or author-bio page) because Google treats an author with a resolvable page as a stronger, more trustworthy signal than a bare name string. Second, publisher.logo needs a real image URL that actually resolves; a broken or placeholder logo link can cause its own separate validation warning.

Use set:html with JSON.stringify, not a template string

Don’t build the JSON-LD by hand-interpolating values into a string. An apostrophe or unescaped quote in a title will silently break the JSON parse, and the whole block fails without any visible error on the page. JSON.stringify() handles escaping correctly; Astro’s set:html then injects it without HTML-escaping the JSON itself (which would corrupt it just as badly).

Verifying the fix

After deploying, run the live URL back through the Rich Results Test. The “Missing field ‘author’” note should be gone, and Google’s own Structured Data Markup Helper or Schema Markup Validator will show the author and publisher objects present with their resolved values. It’s worth checking a couple of different posts, not just one. A bug in how the layout pulls frontmatter (a missing date, for instance) can make the field present on some pages and absent on others, which is easy to miss if you only ever test the same one URL.

One layout, every post

Because this lives in the shared layout and reads from siteConfig and each post’s own frontmatter, every existing and future post gets correct author and publisher data automatically; there’s nothing to remember to add per article.

Browse more posts like this in the Guides & Fixes archive.

Frequently asked

Why does Google's Rich Results Test flag a missing author field when the page already shows a byline?

Rich results are read from the page's JSON-LD script block, not the rendered HTML. A page can display "By Jane Doe" in plain text while emitting no author property in its structured data at all, and the two are never reconciled automatically; that mismatch is exactly what the warning is catching.

What does an Article's JSON-LD need to resolve the missing-author warning?

An author property with a Person object that has at minimum a name (ideally linking to a real About or author-bio page), plus a publisher property with an Organization object that includes a name and a resolvable logo image URL.

Emitted as FAQPage JSON-LD from the same frontmatter — one source, no duplicated prose.

Recent posts

Full-text search via Pagefind · ↑↓ to navigate · ↵ to open