How to exclude nodes with a taxonomy term from XML Sitemap? We can exclude content type, or individual node from XML Sitemap. But, is there anyway to exclude nodes with specific taxonomy term? For example excluding nodes with longlivethetroll tag.
You can use hook_xmlsitemap_element_alter() to check if the node has a particular taxonomy term &amp; exclude it.

function MYMODULE_xmlsitemap_element_alter(&amp;$element, $link, $sitemap) {
  // Check if link is a node link
  if ($link['type'] == 'node') {
    $node = node_load($link['id']);

    // Code to check if $node has taxonomy term goes here
    if ($node has taxonomy term) {
      $element['disabled'] = TRUE; // This removes the node link from sitemap
    }
  }
}