VASTlint

VAST examples / Required fields

A Linear creative with no <MediaFiles>

VAST 2.01 error1 warningVAST-2.0-linear-mediafiles

The scenario

A publisher was troubleshooting a house promo that returned a valid-looking VAST document but showed a blank ad slot followed by an immediate content resume. The promo was meant to be a 20-second pre-roll on their web player.

The broken tag

<?xml version="1.0" encoding="UTF-8"?>
<!-- Linear has MediaFiles but no MediaFile children -->
<VAST version="2.0">
  <Ad id="1">
    <InLine>
      <AdSystem>Test AdServer</AdSystem>
      <AdTitle>Test Ad</AdTitle>
      <Impression><![CDATA[https://example.com/impression]]></Impression>
      <Creatives>
        <Creative>
          <Linear>
            <Duration>00:00:30</Duration>
            <MediaFiles>
            </MediaFiles>
          </Linear>
        </Creative>
      </Creatives>
    </InLine>
  </Ad>
</VAST>

What the validator reports

Running this tag through vastlint produces the following. The primary failure for this example:

errorVAST-2.0-linear-mediafilesIAB VAST 2.0 §2.3.5.2line 11

<MediaFiles> must contain at least one <MediaFile>

The same tag also surfaces these secondary findings — real tags rarely fail in isolation:

warningVAST-2.0-linear-tracking-quartilesIAB VAST 4.1 §3.14.2line 11

<Linear> has no standard quartile tracking events (start/firstQuartile/midpoint/thirdQuartile/complete) — ad will serve but measurement system receives no signal

Why it breaks

The Linear creative has a Duration and tracking, but the <MediaFiles> container is missing, so there is not a single renderable video source. <MediaFiles> is required on an InLine Linear creative — it holds the one-or-more <MediaFile> entries the player chooses from based on bitrate, codec, and dimensions. With it absent, there is literally nothing for the player to fetch and decode.

What it costs

The player treats the creative as unplayable and either fires the VAST error pixel (if one is present) or silently skips to content. Either way the slot is wasted. Because the rest of the document is well-formed, monitoring that only checks for HTTP success and well-formed XML will not flag it, so the gap can persist unnoticed across many sessions.

The fix

Add a <MediaFiles> element containing at least one <MediaFile> with delivery, type, width, and height attributes and a CDATA-wrapped URL. Provide multiple renditions so the player can adapt to bandwidth.

<Linear>
  <Duration>00:00:20</Duration>
  <MediaFiles>
    <MediaFile delivery="progressive" type="video/mp4" width="1280" height="720">
      <![CDATA[https://cdn.example.com/promo-720.mp4]]>
    </MediaFile>
  </MediaFiles>
</Linear>

VAST XML fragment only. This excerpt belongs inside a complete VAST document, so standalone validation will fail until it is wrapped in a full <VAST>response.

Check your own version of this tag

Paste the resolved XML to run the same spec check, test a live tag URL, or inspect the wrapper chain hop by hop.

Related examples

Related reading