How to change the XML video sitemap URL

As of Yoast SEO 20.0, the settings interface inside our plugins has received a major overhaul. Please update to the latest version of Yoast SEO if your plugin does not look like the screenshots you encounter in our Help center.

You can change the XML video sitemap URL by following the steps described below.

Do you have a different question regarding the Video SEO plugin? Check our Video SEO FAQ.

  1. Disable the sitemap feature.

    Disable all sitemaps by following the steps in this article on XML sitemaps.

  2. Add the filter in your theme’s functions.php file.

    See the example code below.

  3. Enable the sitemap feature.

    Enable all sitemaps by following the steps in this article.

This will create two sitemaps:

  1. an XML sitemap for the video custom post type (www.example.com/video-sitemap.xml)
  2. an XML sitemap specifically formatted to meet video sitemap guidelines (www.example.com/vsvideo-sitemap.xml)

The filter

You should add the following filter to your theme’s functions.php file. You can replace vsvideo with your preferred choice.

define ('YOAST_VIDEO_SITEMAP_BASENAME', 'vsvideo');

Related articles

Get free SEO tips!