On this page:
This is some text inside of a div block.
This is some text inside of a div block.
This is some text inside of a div block.

inAlbum

inAlbum · No Google rich result

Appears in

MusicRecording

What is it?

inAlbum links a music recording to the album it belongs to. It accepts a MusicAlbum object or a text reference, connecting individual tracks to their parent release. Search engines use this relationship to build complete discography graphs and associate songs with albums in knowledge panels.

Why this matters for AEO

When someone asks an AI engine "What album is [song] on?", the answer comes from structured relationships between tracks and albums. inAlbum provides that relationship in machine readable form. Without it, AI systems must parse page text to guess album membership, which fails for compilation albums, deluxe editions, and tracks that appear on multiple releases.

What the specs say

Schema.org: The album to which this recording belongs. Accepts MusicAlbum. schema.org/inAlbum

Google: No dedicated Google structured data page exists for MusicRecording. Google does not document specific requirements for this field.

How to find your value

  • Streaming platform — Album name shown on the track page
  • Music database — MusicBrainz release group or Discogs master release
  • Record label site — Release catalog with track listings
  • Webflow CMS — An "Album" reference field in your tracks collection

Format and code

Type: MusicAlbum

Full MusicAlbum object (recommended):

{
  "@context": "https://schema.org",
  "@type": "MusicRecording",
  "name": "Rope",
  "byArtist": {
    "@type": "MusicGroup",
    "name": "Foo Fighters"
  },
  "inAlbum": {
    "@type": "MusicAlbum",
    "name": "Wasting Light",
    "url": "https://example.com/albums/wasting-light"
  },
  "duration": "PT4M5S"
}

Text reference (simpler):

{
  "@type": "MusicRecording",
  "name": "It's Gonna Be Alright",
  "inAlbum": "Colonial Cousins",
  "duration": "PT4M5S"
}

Text references work but lose the type information and URL linkage. Use a MusicAlbum object when the album has its own page.

Track appearing on multiple albums:

{
  "@type": "MusicRecording",
  "name": "Everlong",
  "inAlbum": [
    {
      "@type": "MusicAlbum",
      "name": "The Colour and the Shape"
    },
    {
      "@type": "MusicAlbum",
      "name": "Greatest Hits"
    }
  ]
}

Webflow implementation

Static pages

In Page Settings > Custom Code > Before </head>:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "MusicRecording",
  "name": "Your Track Title",
  "inAlbum": {
    "@type": "MusicAlbum",
    "name": "Your Album Title"
  }
}
</script>

CMS template pages

If your Webflow CMS tracks collection references an albums collection:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "MusicRecording",
  "name": "{{wf {&quot;path&quot;:&quot;name&quot;,&quot;type&quot;:&quot;PlainText&quot;} }}",
  "inAlbum": {
    "@type": "MusicAlbum",
    "name": "{{wf {&quot;path&quot;:&quot;album.name&quot;,&quot;type&quot;:&quot;PlainText&quot;} }}"
  }
}
</script>

In Schema HQ

Field mapping pulls CMS album reference fields to the inAlbum property. It generates a MusicAlbum object with the album name and URL pulled from the referenced collection item.

Real examples

Foo Fighters (schema.org official example):

{
  "@context": "https://schema.org",
  "@type": "MusicGroup",
  "name": "Foo Fighters",
  "track": [
    {
      "@type": "MusicRecording",
      "name": "Rope",
      "duration": "PT4M5S",
      "inAlbum": "foo-fighters-wasting-light.html"
    },
    {
      "@type": "MusicRecording",
      "name": "Everlong",
      "duration": "PT6M33S",
      "inAlbum": "foo-fighters-the-colour-and-the-shape.html"
    }
  ]
}

Colonial Cousins (w3resource structured data tutorial):

{
  "@type": "MusicRecording",
  "name": "It's Gonna Be Alright",
  "duration": "PT4M5S",
  "inAlbum": "Colonial Cousins"
}

Related fields

FAQ

Can a recording belong to multiple albums?

Yes. Use an array of MusicAlbum objects. This is common for tracks that appear on both a studio album and a greatest hits compilation, or on a standard edition and a deluxe edition.

Should inAlbum be a URL or an object?

A MusicAlbum object is better for search engines because it carries type information and can include the album's URL. A plain string or URL reference works but gives search engines less to work with. Use the object form when the album has its own page on your site.

On this page:
This is some text inside of a div block.
This is some text inside of a div block.
This is some text inside of a div block.

Need help with schema on your site?

We implement structured data for Webflow sites — from audit to deployment.

Work with us

Work with us