Video best practices
Video is a growing format for content creation and consumption on the web, and Google indexes videos from millions of different sites to serve to users. Videos can appear in several different places on Google, including the main search results page, video search results, Google Images, and Discover:
Optimize your videos to appear on Google by following these best practices:
- Help Google find your videos
- Ensure your videos can be indexed
- Allow Google to fetch your video content files
- Enable specific video features
- Remove, restrict, or update your videos as needed
Help Google find your videos
- Make sure that each video is available on a public web page where users
can watch the video. Make sure that the page isn't blocked by robots.txt
noindexmetadata; this ensures that Google can find and index your page.
- Include your video in an appropriate HTML tag. Google can more easily identify a
video on your page when there's an HTML tag around it, for example:
- Submit a video sitemap to make it even easier for Google to find your videos.
- Ensure that the page doesn't require complex user actions or specific URL
fragments to load, or Google might not find your videos.
- Don't lazy-load primary content upon user interaction. Googlebot may not find content that requires user interactions to load (for example, swiping, clicking, or typing). Make sure Google can see lazy-loaded content.
- URLs for content or landing pages that require fragment identifiers are not supported.
- Make sure that your videos are visible and easy to find on your video pages. We recommend using a standalone page for each video with a descriptive title or description unique to each individual video. Videos should be prominent on the page and should not be hidden or difficult to find.
Third-Party Embedded Players
If your website embeds videos from third-party platforms like YouTube, Vimeo, or Facebook, Google may index the video both on your web page and on the equivalent page from the third-party hosting site. Both versions may appear in video features on Google.
On your own page where you’ve embedded the third-party player, you should still provide structured data, and you may also include these pages in your video sitemaps. Check with your video host to ensure they allow Google to fetch your video content file; for example, this is supported by YouTube for public videos.
Ensure your videos can be indexed
Once Google has identified a video on a page, additional information is needed to make it eligible to appear in video features.
Provide a high-quality thumbnail
To be eligible to appear in Google video features, a video must have a valid thumbnail image. Otherwise, the page may be indexed but would only appear as a plain blue link.
You can allow Google to generate a thumbnail, or provide one in one of the supported ways:
- If you're using the
<video>HTML tag, specify the
- In a video sitemap, specify the
- In structured data, specify the
- If you allow Google to fetch your video content files, Google can generate a thumbnail for you.
Supported thumbnail formats: See the list of Google Images supported formats.
Size: Minimum 60x30 pixels, larger preferred
Provide structured data
Provide structured data describing your video, to help Google understand what the video is about and surface it for relevant queries. Ensure that any information that you provide in structured data is consistent with the actual video content. When adding structured data, make sure to use unique thumbnails, titles, and descriptions for each video on your site.
Allow Google to fetch your video content files
Allow Google to fetch your video content files by following these best practices:
- Use structured data to provide the
contentURLvalue in a supported file format.
- Don't block Google from fetching the video’s streaming file bytes. For example, don’t block
the video content URL or domain with the
noindextag or robots.txt file.
- The video host page and the server streaming the actual video must have the bandwidth to
be crawled. So if your landing page at
example.com/puppies.htmlhas an embedded puppies video served by
somestreamingservice.commust be accessible to Google and have available server load.
- The video file must be available at a stable URL.
Supported video encodings
Google can fetch the following video file types: 3GP, 3G2, ASF, AVI, DivX, M2V, M3U, M4V, MKV, MOV, MP4, MPEG, OGV, QVT, RAM, RM, VOB, WebM, WMV, XAP.
Use stable URLs for video and thumbnail files
Some CDNs use quickly expiring URLs for video and thumbnail files. These URLs may prevent Google from successfully indexing your videos or fetching the video files.
Use a single unique and stable URL for each video. This allows Google to discover and process the videos consistently, confirm they are still available and collect correct signals on the videos.
If you are concerned about bad actors accessing your content, you can verify Googlebot online or offline before displaying a stable version of your media URLs.
Which URL is which?
There are several URLs that can be associated with a video file on the page. Here is a summary of most of them:
The URL of the page hosting the video. Example:
The URL of the custom player. This is often the src value for an
The URL of the actual content bytes, either on the local site or on a streaming service. Example:
Enable specific video features
Google selects a few seconds from your video to display a moving preview, which can help users
better understand what they’ll find in your video. To make your videos eligible for this feature,
allow Google to fetch your video content files. You can set the maximum duration for these video
previews using the
robots meta tag.
The key moments feature is a way for users to navigate video segments like chapters in a book, which can help users engage more deeply with your content. Google Search tries to automatically detect the segments in your video and show key moments to users, without any effort on your part. Alternatively, you can manually tell Google about the important points of your video.
- If your video is hosted on your web page, there are two ways that you can enable key moments:
Clipstructured data: Specify the exact start and end point to each segment, and what label to display for each segment.
SeekToActionstructured data (beta): Tell Google where timestamps typically go in your URL structure, so that Google can automatically identify key moments and link users to those points within the video.
- If your video is hosted on YouTube, you can specify the exact timestamps and labels in the video description on YouTube. Check out the best practices for marking timestamps in YouTube descriptions.
To opt out of the key moments feature completely (including any efforts Google may make to
show key moments automatically for your video), use the
nosnippet meta tag.
Remove or restrict your videos
Remove a video
To remove a video from your site, do one of the following:
- Return a 404 (Not found) HTTP status code for any landing page that contains a removed or expired video. In addition to the 404 response code, you can still return the HTML of the page to make the change transparent to most users.
- Include a
noindexrobots meta tag on any landing page that contains a removed or expired video. This prevents the landing page from being indexable.
- Indicate an expiration date in your schema.org structured data (the
expiresproperty) or video sitemap (use the
<video:expiration_date>element). Here is an example of a video sitemap with a video that expired in November 2009:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"> <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> Bob shows you how to grill steaks perfectly every time </video:description> <video:player_loc> http://www.example.com/videoplayer?video=123 </video:player_loc> <video:expiration_date>2009-11-05T19:20:30+08:00</video:expiration_date> </video:video> </url> </urlset>
When Google sees a video with an expiration date in the past, we will not include the video in any search results. The landing page may still be shown as a web result, without a video thumbnail. This includes expiration dates from sitemaps, structured data, and meta tags in the site header. Make sure that your expiration dates are correct for each video. While this is useful if your video is no longer available after the expiration date, it's easy to accidentally set the date to the past for an available video. If a video doesn't expire, don't include expiration information.
Restrict a video based on the user's location
You can restrict search results for your video based on the user's location. If your video doesn't have any country restrictions, omit the country restriction tags.
Restrict using structured data
If you use
VideoObject structured data
to describe a video, set the
to specify which regions can get the video search result. If you omit this property, all
regions can see the video in search results.
Restrict using a video sitemap
In a video sitemap, the
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.
<video:restriction> tag must contain one or more space-delimited
ISO 3166 country codes. The
relationship attribute specifies the type of restriction.
relationship="allow": The video can appear only for the specified countries. If no countries are specified, the video will not appear anywhere.
relationship="deny": The video can 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 search results 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> Bob shows you how to get perfectly done steaks every time </video:description> <video:player_loc> http://www.example.com/player?video=123 </video:player_loc> <video:restriction relationship="allow">ca mx</video:restriction> </video:video> </url>
Optimize for SafeSearch
SafeSearch is a setting in Google user accounts that specifies whether to show or block explicit images, videos, and websites in Google Search results. You should help Google understand the nature of your videos in order to apply SafeSearch settings to your videos if appropriate.
Group adult-only videos in a common URL location
If your site contains adult videos, we strongly recommend grouping the videos separately from other videos on your website. For example: http//www.example.com/adult/video.mp4.
Add metadata to adult pages
Our algorithms use a variety of signals to decide whether videos or a whole page should be filtered from the results when the user's SafeSearch filter is turned on. In the case of videos, some of these signals are generated using machine learning, but the SafeSearch algorithms also look at simpler things such as where the video was used previously and the context in which the video was used.
One of the strongest signals is self-marked adult pages. If you publish adult content, we recommend that you add one of the following meta tags to your pages:
<meta name="rating" content="adult" />
<meta name="rating" content="RTA-5042-1996-1400-1577-RTA" />
Many users prefer not to have adult content included in their search results (especially if kids use the same device). When you provide one of these meta tags, it helps to provide a better user experience because users don't see results which they don't want to or expect to see.