# Configuring preferred routing

## **Overview**

Preferred routing is a useful feature when Parallels RAS users with different geo located deployments are connecting to the same Parallels RAS Farm/Site. A common access layer usage (RAS Secure Gateway, HALB, or a third-party load balancer) is not optimal if a resource is located in a different data center in the same RAS Farm/Site. The solution is to configure a preferred access layer server for a specific published resource, in which case any user would connect to a default Secure Gateway, but would be redirected using proximity rules set by the administrator. Typically, using the Secure Gateway closest to the session host provides improved user experience, reduced internal network traffic and associated costs along with providing better use of resources.

{% hint style="info" %}
**Note:** Preferred routing doesn't apply to Azure Virtual Desktop published objects.
{% endhint %}

Here's how preferred routing works:

1. Parallels Client establishes a connection with a Secure Gateway using a standard authentication.
2. Through the RAS Connection Broker, the resource's preferred route (if configured) is identified.
3. Parallels Client receives the preferred public address to launch the resource.
4. Parallels Client then tries to launch the resource through the redirected address and falls back to the original Gateway if it fails.

## **Configure preferred routing**

To configure preferred routing, you first need to specify one or more custom public server addresses for a Site. To do so:

1. In the RAS Management Portal, select the **Site Settings** category.
2. In the **Connection** menu, select **Addresses**.
3. Click the plus-sign icon and in the dialog that opens specify a name for this custom address, an optional description, a public address, port and SSL port (it is recommended to use an SSL port for user session routing).

Once one or more custom server addresses have been configured, you can specify such an address for a published resource as follows:

1. Select the **Publishing** category.
2. Select a published resource.
3. In the middle pane, select **Routing**.
4. In the editing pane, click **Edit**.
5. Select the **Enable preferred routing** option.
6. Click the plus-sign icon.
7. Select a custom address from the list to be used as preferred route for this published resource.


---

# 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.parallels.com/landing/ras-mp-guide/v19-en-us/publishing/manage-published-resources/configuring-preferred-routing.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.
