# How to hide inactive categories in sitemap.xml?

**URL:** https://forum.shopware.com/t/how-to-hide-inactive-categories-in-sitemap-xml/70315
**Category:** Allgemein
**Created:** [20. Oktober 2020 um 11:37 UTC](https://forum.shopware.com/t/how-to-hide-inactive-categories-in-sitemap-xml/70315 "2020-10-20T11:37:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![logTom](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/logtom/32/13273_2.png) [@logTom](https://forum.shopware.com/u/logTom)
#### Post date: [20. Oktober 2020 um 11:37 UTC](https://forum.shopware.com/t/how-to-hide-inactive-categories-in-sitemap-xml/70315/1 "2020-10-20T11:37:31Z")

</div>

Hi,  
how can I modify the generated sitemap (sitemap:generate) to hide inactive categories. If I click on the link in the sitemap.xml I&nbsp;get a 404 page.

---

<div class="post-metadata">

### Author: ![Hamada\_Saidi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/hamada_saidi/32/16194_2.png) [@Hamada\_Saidi](https://forum.shopware.com/u/Hamada_Saidi)
#### Post date: [17. Februar 2022 um 13:02 UTC](https://forum.shopware.com/t/how-to-hide-inactive-categories-in-sitemap-xml/70315/2 "2022-02-17T13:02:37Z")

</div>

normally hidden categories won’t be displayed , however you can write a CustomUrlProvider

> **[Add custom sitemap entries](https://developer.shopware.com/docs/guides/plugins/plugins/content/sitemap/add-custom-sitemap-entries)**
