# Can we exclude specific sitemap item from link rewriting?

**URL:** <https://community.bloomreach.com/t/can-we-exclude-specific-sitemap-item-from-link-rewriting/2234>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [November 13, 2020, 8:18am UTC](https://community.bloomreach.com/t/can-we-exclude-specific-sitemap-item-from-link-rewriting/2234 "2020-11-13T08:18:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yeshwanth\_Lagala](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/yeshwanth_lagala/32/777_2.png) [@Yeshwanth\_Lagala](https://community.bloomreach.com/u/Yeshwanth_Lagala)\
**Post date:** [November 13, 2020, 8:18am UTC](https://community.bloomreach.com/t/can-we-exclude-specific-sitemap-item-from-link-rewriting/2234/1 "2020-11-13T08:18:08Z")

</div>

Hi All,

I have a scenario where, I need to exclude specific sitemap from “_any_”.  
Is it possible ?

**Scenario:**  
I have sitemap called content and one more sitemapitem as “_any_” under content.  
_any_ has relativecontentpath as ${1}

Case 1: localhost:8080/site/channel/content/herobanner – this should be displayed  
Case 2: localhost:8080/site/channel/content/samplemessage – don’t want this to be displayed.

Thanks,  
Yeshwanth.

---

<div class="post-metadata">

**Author:** ![bcanvural](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/bcanvural/32/235_2.png) [@bcanvural](https://community.bloomreach.com/u/bcanvural)\
**Post date:** [November 13, 2020, 8:32am UTC](https://community.bloomreach.com/t/can-we-exclude-specific-sitemap-item-from-link-rewriting/2234/2 "2020-11-13T08:32:03Z")

</div>

Hey Yeshwanth,

There’s a boolean “hst:excludedforlinkrewriting” property for sitemap items. Never used it but it’s probably what you are looking for

---

<div class="post-metadata">

**Author:** ![Yeshwanth\_Lagala](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/yeshwanth_lagala/32/777_2.png) [@Yeshwanth\_Lagala](https://community.bloomreach.com/u/Yeshwanth_Lagala)\
**Post date:** [November 13, 2020, 9:02am UTC](https://community.bloomreach.com/t/can-we-exclude-specific-sitemap-item-from-link-rewriting/2234/3 "2020-11-13T09:02:02Z")

</div>

Hi @bcanvural,

I think this property will exclude all the items which falls under _any_  
But in my case, If I have 10 URL’s under any, want to exclude only 1, remaining 9 should work.

Thanks,  
Yeshwanth.

---

<div class="post-metadata">

**Author:** ![bcanvural](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/bcanvural/32/235_2.png) [@bcanvural](https://community.bloomreach.com/u/bcanvural)\
**Post date:** [November 13, 2020, 9:14am UTC](https://community.bloomreach.com/t/can-we-exclude-specific-sitemap-item-from-link-rewriting/2234/4 "2020-11-13T09:14:32Z")

</div>

then you probably want to look at this: [https://documentation.bloomreach.com/14/library/concepts/links-and-urls/customize-link-processing.html](https://documentation.bloomreach.com/14/library/concepts/links-and-urls/customize-link-processing.html)

---

<div class="post-metadata">

**Author:** ![machak](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/machak/32/1298_2.png) [@machak](https://community.bloomreach.com/u/machak)\
**Post date:** [November 13, 2020, 11:07am UTC](https://community.bloomreach.com/t/can-we-exclude-specific-sitemap-item-from-link-rewriting/2234/5 "2020-11-13T11:07:24Z")

</div>

try to create explicite sitemaps for those items:

_any_  
samplemessage (hst:excludedforlinkrewriting)  
someother-speciallink (hst:excludedforlinkrewriting)

---

<div class="post-metadata">

**Author:** ![Yeshwanth\_Lagala](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/yeshwanth_lagala/32/777_2.png) [@Yeshwanth\_Lagala](https://community.bloomreach.com/u/Yeshwanth_Lagala)\
**Post date:** [November 13, 2020, 12:13pm UTC](https://community.bloomreach.com/t/can-we-exclude-specific-sitemap-item-from-link-rewriting/2234/6 "2020-11-13T12:13:39Z")

</div>

Thank you for your inputs @machak  
This didn’t work !!  
The issue is I don’t have a page on Bloomreach application, but am still trying to cache purge this document whenever modified using custom code.  
When am trying to add sample-message as sitemap item or because of “_any_” sitemap item, it considers as sitemap and returns the URL for cache purge, which is not present and it fails.

Thanks,  
Yeshwanth.
