How to Create a Video Sitemap for Your Website
Published
A video sitemap connects a page on your website with its video file or embedded player, thumbnail, and description. It gives Google another way to discover the video. Start with one published viewing page, check each URL, and add a small XML entry before generating entries for the rest of your library.
Choose a page where watching is the main task
A lesson, interview, or full demonstration can have its own viewing page. If the video is only a decorative loop on a product page, a sitemap will not turn that page into a dedicated video result. Google’s video SEO guidance explains watch-page eligibility. The watch-page troubleshooting guide helps you decide whether a separate viewing page would serve readers.
Open the chosen page without signing in. Play the intended video and inspect its media or iframe request in the browser’s Network panel. Keep the page URL, thumbnail URL, and video or player URL together in your notes. They do different jobs in the sitemap.
Match each field to the right URL
<loc>: the page on your site where someone watches the video.<video:thumbnail_loc>: the actual thumbnail image.<video:content_loc>: the video file itself, such as a hosted MP4.<video:player_loc>: a player URL for that specific video, such as a YouTube embed URL.
Google requires a thumbnail, title, description, and either a content location or player location inside the video entry. Use the file location when available; use the player location when you cannot provide it. Neither should repeat the parent page URL. The video-sitemap reference defines these fields.
For a third-party embed, copy its supported embed URL rather than guessing the location of the provider’s media files. If you are still deciding between an embed and a file you host yourself, see the social-video reuse guide.
Create one complete entry
This example describes an imaginary paper-folding lesson served as an MP4. Replace every example URL and both text fields. The title and description should describe the actual video and agree with the viewing page.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>https://example.com/watch/paper-crane/</loc>
<video:video>
<video:thumbnail_loc>https://example.com/media/crane.jpg</video:thumbnail_loc>
<video:title>Fold a paper crane</video:title>
<video:description>Follow each fold from a square sheet
of paper to a finished crane.</video:description>
<video:content_loc>https://media.example.com/crane.mp4</video:content_loc>
</video:video>
</url>
</urlset>
You can keep video entries in a separate sitemap or add the video extension to your existing XML sitemap. Check what your CMS or SEO plugin already generates before adding another file. If a generator owns the sitemap, change its source data or template so the next build preserves your work.
Keep the XML valid
Save the file as UTF-8. Use full URLs, including the scheme and hostname. Escape ampersands in text and query strings: an address ending in ?id=lesson&lang=en in the XML represents ?id=lesson&lang=en after parsing. The Sitemaps protocol documents entity escaping. Prefer an XML serializer when generating many entries.
Only include optional metadata you can keep accurate. Do not invent a duration or publication date to fill a template. Match the thumbnail to the actual lesson; the poster-image guide covers choosing and checking a preview.
Publish and inspect the response
For a separate file, publish it at a stable URL such as https://example.com/video-sitemap.xml. Check that the public response contains the XML. A successful-looking HTTP status can still conceal a homepage fallback or login page.
curl --fail --show-error --location \
--dump-header - \
'https://example.com/video-sitemap.xml'
Then check the referenced page, image, and video or player separately. Make sure a firewall or robots rule does not block Google’s access. A short-lived signed media URL needs particular attention: a link that works during your test may expire before a crawler uses it. Listing a protected resource does not grant access to it.
Submit the deployed sitemap URL through Search Console’s Sitemaps report, or reference it in robots.txt. Google’s submission instructions cover both. If you submit through Search Console, inspect any fetch or parsing errors in that report.
Check video indexing separately
A “Success” status in the Sitemaps report means Google fetched and read the sitemap without errors. It does not establish that the page or video was indexed. The Sitemaps report documentation explains that distinction.
Use URL Inspection for the viewing page and the Video indexing report for detected videos. Its sitemap filter includes indexed pages where Google found a video; it is not a complete list of everything in your XML. Investigate the reported reason for a missing video, such as a thumbnail or watch-page issue, rather than repeatedly resubmitting the same file.
Keep the sitemap data with your video publishing workflow. When a lesson moves, is replaced, or is removed, update its page, player, thumbnail, and sitemap entry together.