How to create a video sitemap in WordPress
WordPress creates a basic XML sitemap, but it does not automatically add Google’s video metadata. For a few stable videos, you can create and upload a separate XML file manually; for a growing site, use a video-sitemap plugin to keep entries current.
- 01List your video landing pages
- 02Collect the required video details
- 03Create the XML sitemap
- 04Upload the file manually
- 05Submit and validate the sitemap
- 06Use AIOSEO for the fast route
What you need
- A WordPress site with publicly accessible video pages
- Admin access to WordPress and your hosting account
- A video thumbnail, title, description and player or file URL for each video
- Access to Google Search Console
List your video landing pages
Make a list of the published WordPress pages or posts where each video appears. The sitemap’s main loc value must be the page containing the video, not just the YouTube, Vimeo or MP4 URL.
Check that each page is public, indexable and accessible without a login. Google recommends using a video sitemap for content it might not discover easily, but the sitemap does not make a blocked or noindex page eligible by itself.
Collect the required video details
For every video, collect a stable thumbnail URL, the video title, a description and either the actual video file URL or a player URL. Google requires video:thumbnail_loc, video:title, video:description and either video:content_loc or video:player_loc.
Use video:player_loc for embedded YouTube or Vimeo players when you do not have the actual media file. Keep the title and description consistent with what visitors see on the WordPress page.
Create the XML sitemap
Create a plain-text file such as video-sitemap.xml. Start it with the standard sitemap namespace and Google’s video namespace, then add one url element for each landing page. Put one or more video:video elements inside the matching url element.
Escape ampersands and other XML characters, or place titles and descriptions inside CDATA sections. Do not use the landing-page URL as the video:content_loc or video:player_loc value, which is a common validation error.
Upload the file manually
For a small site, upload video-sitemap.xml to a public location in your site’s document root using SFTP, your hosting file manager or another server access method. Check that it opens at a URL such as https://example.com/video-sitemap.xml and returns XML rather than a WordPress 404 page or an HTML login screen.
WordPress core provides a basic sitemap index at /wp-sitemap.xml, but that is not a substitute for adding Google’s video-specific metadata. The drawback of the manual route is maintenance: every new, removed or changed video requires you to edit and re-upload the XML file.
Submit and validate the sitemap
In Google Search Console, open the Sitemaps report for the correct property and submit the full URL of your video sitemap. You can also reference it in your site’s robots.txt file, but submitting it in Search Console makes it easier to monitor processing and errors.
Inspect the submitted sitemap and review warnings about missing thumbnails, inaccessible media, invalid XML or pages that do not contain the listed video. Google requires referenced files to be reachable by Googlebot, without robots.txt blocks, firewalls or login requirements.
Use AIOSEO for the fast route
For a site that publishes videos regularly, AIOSEO can generate and update the video sitemap from the WordPress dashboard. In AIOSEO, open the sitemap settings, select the Video Sitemap section, enable it and choose the post types or taxonomies that should be included. Then open the generated sitemap and submit its URL in Search Console.
AIOSEO supports common YouTube, Vimeo and locally hosted video embeds, but detection still depends on how the video is added. Review the generated entries, especially when a page builder or custom JavaScript inserts the player. The Video Sitemap feature is available in AIOSEO Pro or above.
Let AIOSEO do it
Automatically builds video sitemaps with schema support, ideal when you need search engines to discover embedded videos.
Sources
- developers.google.cn /search/docs/crawling-indexing/sitemaps/video-sitemaps?hl=en…
- developers.google.com /search/docs/appearance/video?utm_source=openai
- developers.google.com /search/docs/crawling-indexing/sitemaps/video-sitemaps?rd=1…
- make.wordpress.org /core/2020/07/22/new-xml-sitemaps-functionality-in-wordpress…
- aioseo.com /docs/supported-videos/?utm_source=openai
Questions
- Does WordPress create a video sitemap automatically?
- No, WordPress creates a basic XML sitemap but does not automatically add Google’s video sitemap metadata. Its core sitemap helps search engines discover URLs, while a video sitemap adds details such as the thumbnail, title, description and player or media URL. You need to create those entries yourself or use an SEO plugin that supports video sitemaps.
- Can I create a video sitemap without a plugin?
- Yes, you can create a separate XML file manually and upload it to your site. This works for a small number of stable videos, but you must update the file whenever a video page, thumbnail, title or player URL changes. A manual file also needs to be checked for XML errors and submitted to Google Search Console.
- What is the difference between video content_loc and player_loc?
- The <code>video:content_loc</code> tag points to the actual video file, such as an MP4, while <code>video:player_loc</code> points to a player page or embed player. Google recommends content_loc when you control and can expose the media file; use player_loc for videos hosted by services such as YouTube or Vimeo. Provide at least one of them.
- Why is my video sitemap not showing video results?
- A valid sitemap does not guarantee a video result because Google still evaluates the page and video independently. Common causes include a blocked thumbnail or media URL, a noindex landing page, missing required tags, a player URL that matches the landing-page URL, or a video that is not the main content of the page. Check the Search Console sitemap report and the rendered page.
- Should I add embedded YouTube videos to a video sitemap?
- Yes, embedded YouTube videos can be included when the WordPress page containing the embed is publicly accessible and the sitemap provides the required video metadata. Use the YouTube player or embed URL as <code>video:player_loc</code> when the actual file URL is unavailable, and provide a stable thumbnail URL that Googlebot can fetch.