How to Include Empty Taxonomies in Yoast SEO Sitemap.xml?

Do you want to include empty taxonomies in your WordPress website’s Yoast SEO Sitemap.xml file?

Yoast doesn’t display or exclude empty taxonomies or categories from the sitemap.xml file by default.

Why Include Empty Taxonomies in Yoast SEO Sitemap.xml File in WordPress?

There are many benefits of including empty taxonomies in your Yoast SEO sitemap.xml, depending on your specific needs and goals. Here are some reasons why you might consider doing this:

1. Future Content Planning

Including empty taxonomies is beneficial when you plan to add content to these taxonomies in the future. This proactive indexing helps speed up the process of search engine indexing as they already recognize the taxonomy.

2. Site Structure Clarity for Search Engines

By including empty taxonomies, search engines get a complete picture of your site’s structure, as it helps them understand the hierarchy and organization of your website, which leads to improved indexing and crawling.

3. SEO Strategy

For a long-term SEO strategy, populating certain categories or tags over time can signal search engines that these sections are important parts of your website. This strategy can be especially beneficial for niche websites where taxonomy names are significant keywords.

5. Link Equity

Even empty taxonomies can accumulate link equity over time if other sites are linking to them. This provides a head start once content is added, as the taxonomy pages may already have some authority when search engines crawl them.

6. Special Cases: Seasonal Content

Empty taxonomies can be beneficial for websites that create seasonal content, such as black Friday and Cyber Monday deals, Christmas and New Year deals, etc. Taxonomies may remain empty during off-seasons, but including them in the sitemap.xml ensures search engines know that content or products will be added again.

Code Snippet to Include Empty Taxonomies in Yoast SEO Sitemap.xml

php
/**
 * Add empty taxonomies to Yoast SEO Sitemap.xml File in WordPress
 */
add_filter('wpseo_sitemap_exclude_empty_terms', '__return_false');

Leave a Reply

Your email address will not be published. Required fields are marked *