# Prevent Dynatrace from adding a x-dynatrace header

**URL:** <https://community.dynatrace.com/t/prevent-dynatrace-from-adding-a-x-dynatrace-header/39548>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, application-monitoring, request-attributes\
**Created:** [May 2, 2023, 1:32pm UTC](https://community.dynatrace.com/t/prevent-dynatrace-from-adding-a-x-dynatrace-header/39548 "2023-05-02T13:32:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naveen](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/naveen/32/2570_2.png) [@Naveen](https://community.dynatrace.com/u/Naveen)\
**Post date:** [May 2, 2023, 1:32pm UTC](https://community.dynatrace.com/t/prevent-dynatrace-from-adding-a-x-dynatrace-header/39548/1 "2023-05-02T13:32:46Z")

</div>

Hello,

I am monitoring .net service in fullstack mode via oneagent on host. This service convert and format data to post in Kafka topics and this is consumed by the other .net service but we have found that Dynatrace is adding extra header which is ‘x-dynatrace’ along with existing headers.

Question:

1. Can we prevent Dynatrace from adding&nbsp;‘x-dynatrace’ and what’s the impact?

2. When consumer reads the topic will they get this header as well along with others?

3. What will be the correct way to monitor this service?

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [May 2, 2023, 3:55pm UTC](https://community.dynatrace.com/t/prevent-dynatrace-from-adding-a-x-dynatrace-header/39548/2 "2023-05-02T15:55:41Z")

</div>

Hi,

I do not recommend you touching that header:

 ![AntonPineiro_0-1683042873315.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/1/d13e48c991a7893cc2e46f11f2154d2ae08418a0.png)

You can see all request headers [here](https://www.dynatrace.com/support/help/shortlink/rum-firewall#request-headers).

Best regards

---

<div class="post-metadata">

**Author:** ![sbundi](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@sbundi](https://community.dynatrace.com/u/sbundi)\
**Post date:** [August 12, 2024, 9:01am UTC](https://community.dynatrace.com/t/prevent-dynatrace-from-adding-a-x-dynatrace-header/39548/3 "2024-08-12T09:01:01Z")

</div>

I would also like to know if its actually possible. Sometimes the client may insist on it

---

<div class="post-metadata">

**Author:** ![nils\_stellhorn](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/nils_stellhorn/32/20154_2.png) [@nils\_stellhorn](https://community.dynatrace.com/u/nils_stellhorn)\
**Post date:** [November 12, 2024, 10:01am UTC](https://community.dynatrace.com/t/prevent-dynatrace-from-adding-a-x-dynatrace-header/39548/4 "2024-11-12T10:01:56Z")

</div>

Hello,

I just stumbled over your post now, because I have a similar problem, where we need to stop the H-Dynatrace header from being added for a specific request.

I think the best way to do this is to add the URL path you would like to exclude under the ‘URL-based sampling’ setting. You have to switch on the toggle for 'Ignore URLs with specific path and/or query parameters.

 ![nils_stellhorn_0-1731394761399.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/3/d31b72ee1405eb8433fb6203f567216a2d745ae7.png)

More about that solution here: [Adaptive Traffic Management with Dynatrace Platform Subscription (DPS) — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/url-sampling)

Another possibility is, to exclude the web request under ‘Deep monitoring’ → ‘Exclude specific incoming web request URLs’.

 ![nils_stellhorn_0-1731405664312.png](https://global.discourse-cdn.com/dynatrace/original/2X/9/93b100e07fb836dd4a8e6a705ce6f215ac18e992.png)

Here you can define URL paths that you would like to exclude from monitoring and alerting. I am not sure though, if this also prevents the x-dynatrace header from being set.

---

<div class="post-metadata">

**Author:** ![sbundi](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@sbundi](https://community.dynatrace.com/u/sbundi)\
**Post date:** [November 12, 2024, 10:24am UTC](https://community.dynatrace.com/t/prevent-dynatrace-from-adding-a-x-dynatrace-header/39548/5 "2024-11-12T10:24:52Z")

</div>

Thanks a lot for this. Let me try it out

---

<div class="post-metadata">

**Author:** ![nils\_stellhorn](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/nils_stellhorn/32/20154_2.png) [@nils\_stellhorn](https://community.dynatrace.com/u/nils_stellhorn)\
**Post date:** [November 14, 2024, 2:46pm UTC](https://community.dynatrace.com/t/prevent-dynatrace-from-adding-a-x-dynatrace-header/39548/6 "2024-11-14T14:46:06Z")

</div>

Short update to this:  
This doesn’t work. URL-based sampling basically creates a new URL type with all the sampled requests being part of the domain and the exclusion rules just filter the requests out of the Dynatrace cluster, but do not prevent the x-dynatrace header from being placed.
