---
title: Identify Synthetic Bots
description: Identify incoming Synthetic requests
breadcrumbs: >-
  Docs > Synthetic Testing and Monitoring > Synthetic Monitoring Guides >
  Identify Synthetic Bots
---

# Identify Synthetic Bots

## Overview{% #overview %}

Some parts of your systems may not be available to robots without the appropriate identification. You may also want to avoid collecting analytics from Datadog robots.

Try a combination of the following methods to detect Datadog's Synthetic Monitoring robots.

## IP addresses{% #ip-addresses %}

Use the **Synthetic Monitoring IP ranges** corresponding to each Datadog managed location:

```
https://ip-ranges./synthetics.json
```

The listed IPs use the Classless Inter-Domain Routing (CIDR) notation and may require conversion to IPv4 address ranges before use. Except in the case of new managed locations IPs, the listed IPs rarely change.

If you want to be alerted when the listed IPs change, create an API test on the endpoint above with a JSONPath assertion such as `$.synthetics['prefixes_ipv4_by_location']['aws:ap-northeast-1'].length`.

## Default headers{% #default-headers %}

Identify Datadog robots by using **default headers**, which are attached to the requests generated by Synthetic tests.

### `user-agent`{% #user-agent %}

By default, a `user-agent` header is added to all requests performed by Synthetic tests. Any custom `user-agent` added in the test overrides the default one.

{% tab title="Single and multistep API tests" %}
For single and multistep API tests, the default `user-agent` header is `Datadog/Synthetics`.
{% /tab %}

{% tab title="Browser tests" %}
For browser tests, the value of the default `user-agent` header varies depending on the browser and device executing the test. The default `user-agent` value always ends with `DatadogSynthetics` to allow you to identify Synthetic tests.
{% /tab %}

### `sec-datadog`{% #sec-datadog %}

A `sec-datadog` header is added to all requests performed by Synthetic tests. The value includes the test ID which the request originates from.

{% tab title="Single and multistep API tests" %}

```
sec-datadog: Request sent by a Datadog Synthetics API Test (https://docs.datadoghq.com/synthetics/) - test_id: <SYNTHETIC_TEST_PUBLIC_ID>
```

{% /tab %}

{% tab title="Browser tests" %}

```
sec-datadog: Request sent by a Datadog Synthetics Browser Test (https://docs.datadoghq.com/synthetics/) - test_id: <SYNTHETIC_TEST_PUBLIC_ID>
```

{% /tab %}

### APM headers{% #apm-headers %}

A number of [**other APM specific headers**](https://docs.datadoghq.com/synthetics/apm/#how-are-traces-linked-to-tests) such as `x-datadog-origin: synthetics` is also added to requests generated by Synthetic API and browser tests.

## Customize requests{% #customize-requests %}

You can leverage your API and browser test configuration in **Advanced options** and add specific identifiers to your tests' requests such as **custom headers**, **cookies**, and **request bodies**.

## Browser variables{% #browser-variables %}

When a Datadog robot is rendering your application, the `window._DATADOG_SYNTHETICS_BROWSER` variable is set to `true`. To remove the robot actions from your analytics data, wrap your analytics tool code with the following test:

```javascript
if (window._DATADOG_SYNTHETICS_BROWSER === undefined) {
  initializeAnalytics()
}
```

If you use the browser variable to identify Synthetic bots on Firefox, Datadog cannot guarantee that the browser variable is set before your code executes.

## Cookies{% #cookies %}

Cookies that are applied in your browser include `datadog-synthetics-public-id` and `datadog-synthetics-result-id`.

These cookies are available for all steps in Firefox. For Microsoft Edge and Google Chrome, these cookies are set only for the start URL.

## Further Reading{% #further-reading %}

- [Introducing Datadog Synthetic Monitoring](https://www.datadoghq.com/blog/introducing-synthetic-monitoring/)
- [Learn about Synthetic Monitoring](https://docs.datadoghq.com/synthetics/)
- [Configure a Browser Test](https://docs.datadoghq.com/synthetics/browser_tests/)
- [Configure an API Test](https://docs.datadoghq.com/synthetics/api_tests/)
