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

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-x-for-attribute-itemtype-on-element-y-the-string-x-is-not-an-absolute-url
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

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

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

## Valid example

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