URLs of excluded taxonomy terms are output to sitemap.xml

Created on 4 August 2025, 2 months ago

Problem/Motivation

I created a taxonomy term but don't want to output its URL in sitemap.xml, so I specified “Do not index this entity in sitemap Default”, but the URL of taxonomy term is output to sitemap.xml.
I rebuilt sitemap.xml several times, but the phenomenon still occurs.

Proposed resolution

Taxonomy terms with “Do not index” should not be output to sitemap.xml.

🐛 Bug report
Status

Active

Version

4.2

Component

Code

Created by

🇯🇵Japan kentaono

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kentaono
  • 🇩🇪Germany gbyte Berlin

    This would be bad and I would be surprised that nobody has noticed it.

    Please create bug reports against the dev version of the module (test the development version).

    Also please provide a step-by-step guide of how to reproduce the bug. It would be best if you tried that on a fresh Drupal install, because there may be other modules or 3rd party extensions of this module interfering.

  • 🇯🇵Japan kentaono

    Here is step-by-step guide of how to reproduce.

    1. Entityes inclusion settings are shown in fig01.png
    2. Taxonomy term entity type settings are shown in fig02.png. By default, Taxonomy term is indexed.
    3. Individual index setting is shown in fig03.png. In this example, this term is set not to be indexed.
    4. However, that term is indexed as shown in fig04.png.

    Best regards,
    Kentaro Ono

  • 🇩🇪Germany gbyte Berlin
  • 🇩🇪Germany gbyte Berlin

    Sorry, but I could not reproduce the issue.

    I created a vocabulary, set it as included and I overwrote a single term to not be included: Term does not show on the sitemap.

    There are many ways in which this can be a misconfiguration. Please check if you don't include the path itself in "custom links", please check if you don't have a custom or contrib module extending Simple XML sitemap including these links, etc.

    This is why I asked you to try and reproduce this on a fresh Drupal instance. Let me know if you can do that; in terms of solving it for yourself, you can try and debug it by resetting the module's inclusion settings and including things step-by-step while checking the sitemap output.

  • 🇯🇵Japan kentaono

    I also built a clean Drupal environment with only Simple XML Sitemap added and tried it out.
    In that environment, the terms I did not include did not appear in sitemap.xml, but the ones I did include did.
    It may be that there is a misconfiguration or interference with other modules in the environment where the problem occurred.
    You can leave this Issue closed.

    Best regards,
    Kentaro Ono

Production build 0.71.5 2024