> For the complete documentation index, see [llms.txt](https://docs.mailtrap.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mailtrap.io/email-api-smtp/advanced/excluding-specific-links-from-tracking.md).

# Excluding Links from Tracking

By default, when link tracking is enabled for a domain, Mailtrap rewrites links in your emails to add tracking redirects. However, in some cases you may want to exclude certain links (such as app deeplinks or sensitive URLs) from being tracked.

### How to Disable Tracking for a Specific Link

To prevent a link from being tracked, add the special attribute `data-mt-no-track` to your `<a>` tag in the HTML body of the email.

```html
<a data-mt-no-track href="https://example.com/deeplink">Open in App</a>
```

When this attribute is present:

* The link in the HTML body will not be replaced with a tracking redirect.
* If the same link also exists in the Text body of your email, it will also remain untouched (not rewritten).

### Notes

* This works on a per-link basis - all other links without the attribute will still be tracked.
* The attribute must be included in the HTML body. If the identical URL also appears in the Text body, it will inherit the no-track behavior.
* Use this for app deeplinks or any URL where tracking redirects could break functionality.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mailtrap.io/email-api-smtp/advanced/excluding-specific-links-from-tracking.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
