# Failed Redirect Destination

During a redirect through tracking links, a few things can happen such as:

* low user quality
* proxy or VPN use
* wrong GEO targeting
* wrong device or browser version

This prevents users from successful redirect to the final destination - the Play Store, the App Store or the intended Landing Page.

## Setting your custom Redirect Destination

You can configure an **https redirect target** for failed offer redirects in our publisher dashboard.

This will override the standard "Error Page" (we call it "Share Offer" page) displayed in case of redirect errors.

To do so, navigate to **Placements / Apps**, edit your placement and set the **Failed Redirect Destination**:

<figure><img src="/files/ZlEsCUAwhyQiyddUDaBe" alt=""><figcaption></figcaption></figure>

A typical redirect destination may look like this:

```
https://your-redirect-destination.com/redirect?user_id={external_identifier}&offer_id={offer_id}&reason_code={reason_code}&reason_message={reason_message}
```

{% hint style="success" %}
On your own redirect destiantion (landing page), you would be able to show a tailored:

* error message to users
* simply redirect the user back into your website or app
* or anything similar of your choice
  {% endhint %}

## Available Macros

Below is a list of available macros to use in your redirect URL to better understand why a certain click is  failing to get redirected. That way you can improve your integration down the road.

| Variable               | Type   | Description                                                                                                                                        |
| ---------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| {external\_identifier} | string | The user identifier (EXTERNAL IDENTIFIER) originally passed in the tracking link.                                                                  |
| {placement\_id}        | string | The ID of the placement for which the failed redirect happened                                                                                     |
| {offer\_id}            | int    | ID of the offer for which the redirect failed                                                                                                      |
| {reason\_code}         | int    | Code indicating the type of failed redirect so you can group different reasons and their frequency - e.g. 310                                      |
| {reason\_message}      | string | A more detailed message of the reason for the redirect failure - e.g. "We are sorry, but the offer you were looking for is not available for you!" |


---

# Agent Instructions: 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:

```
GET https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/failed-redirects/failed-redirect-destination.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
