Webmasters

Video Search - Webmaster EDU

Video Country Restrictions

Video Sitemaps and mRSS allow you to indicate what countries a video is allowed to be shown in. If your video does not have any country restrictions, you should omit any country restriction tags.

Video Sitemaps

In video Sitemaps, the video:restriction tag can be used to allow or deny the video from appearing in specific countries. Only one video:restriction tag is allowed per video entry.

The video:restriction tag should contain a list of space-delimited ISO 3166 country codes. The required relationship attribute specifies the type of restriction.

  • relationship="allow" - The video will appear only for the specified countries. If no countries are specified, the video will not appear anywhere.
  • relationship="deny" - The video will appear everywhere except for the specified countries. If no countries are specified, the video will appear everywhere.

In this video Sitemap example, the video will only appear in Canada and Mexico.

   <url> 
     <loc>http://www.example.com/videos/some_video_landing_page.html</loc>
     <video:video>
       <video:thumbnail_loc>http://www.example.com/thumbs/123.jpg</video:thumbnail_loc> 
       <video:title>Grilling steaks for summer</video:title>
       <video:description>Alkis shows you how to get perfectly done steaks every            
         time</video:description>
       <video:player_loc>http://www.example.com/player.swf?video=123</video:player_loc>
       <video:restriction relationship="allow">CA MX</video:restriction> 
     </video:video> 
   </url> 

You can find out more about video Sitemaps and the video:restriction tag in the video Sitemaps article.

mRSS

Videos in mRSS feeds can specify country restrictions can by using the media:restriction tag with the required type attribute set to country. media:restriction also requires a relationship attribute set to allow or deny and accepts a space-delimited list of ISO 3166 country codes.

In this example mRSS entry, this video will appear everywhere except for the United States and Canada.

  <item xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/">
    <link>http://www.example.com/examples/mrss/example.html</link>
    <media:content url="http://www.example.com/examples/mrss/example.flv" fileSize="405321"
      type="video/x-flv" height="240" width="320" duration="120" medium="video" isDefault="true">
      <media:title>Grilling Steaks for Summer</media:title>
      <media:description>Get perfectly done steaks every time</media:description>
      <media:thumbnail url="http://www.example.com/examples/mrss/example.png" height="120" width="160"/>
    </media:content>
    <media:restriction relationship="deny" type="country">us ca</media:restriction>
  </item>

Read more about using mRSS feeds for Google Video Search or about the media:restriction tag in the mRSS specification.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.