How to change the XML video sitemap URL

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');