Skip to main content
HTML Validation

Bad value “X” for attribute “itemtype” on element “Y”: The string “X” is not an absolute URL.

About This HTML Issue

Every vocabulary type in the itemtype attribute must be an absolute URL with a scheme, such as https://schema.org/BlogPosting, not a protocol-relative //schema.org/BlogPosting or a bare schema.org/BlogPosting.

In microdata, itemtype names the type of the item created by itemscope. The value is an identifier that browsers never follow as a link, and the HTML specification requires each identifier to be a valid absolute URL. A URL that starts with // borrows the scheme of the current page, so it is relative, and a value without any scheme reads as a relative path. Search engines and other microdata consumers compare the type against known vocabulary URLs, so a relative value may not be recognized as the schema.org type you meant.

The attribute can hold several space-separated types. The validator checks each one, so the message's "Bad value" shows the whole attribute while "The string" names the token that failed. Protocol-relative values often come from older themes and templates written when sites switched between http and https; replace them with the full https://schema.org/... URL.

Invalid example

<article itemscope itemtype="//schema.org/BlogPosting">
  <h1 itemprop="headline">Release notes for version 2.0</h1>
</article>

Valid example

<article itemscope itemtype="https://schema.org/BlogPosting">
  <h1 itemprop="headline">Release notes for version 2.0</h1>
</article>

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
€5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly →

Join teams across 40+ countries