Using Front Door as a redirect for Windows Virtual Desktops

Allen, Joseph 5 Reputation points
2023-03-24T18:26:30.7766667+00:00

I'm trying to find a way to use a friendly URL like https://wvd.domainname.com and have it direct users to https://client.wvd.microsoft.com/arm/webclient/

There have been write ups on how to do this with Function Apps and Front Doors a few years ago but it looks like some things have changed and some options aren't available anymore and when I've tried it myself it fails.

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
850 questions
Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,835 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Erkan Sahin 840 Reputation points
    2023-03-25T17:27:32.5133333+00:00

    Yes, it is possible to use a friendly URL like https://wvd.domainname.com to redirect users to https://client.wvd.microsoft.com/arm/webclient/. There are several ways to achieve this, but one common approach is to use Azure Front Door with a custom domain name and a routing rule.

    Here are the general steps you would need to follow:

    1. Create an Azure Front Door instance and configure it with a backend pool pointing to https://client.wvd.microsoft.com/arm/webclient/.
    2. Add a custom domain name like https://wvd.domainname.com to the Front Door instance.
    3. Create a routing rule in the Front Door instance to forward requests for https://wvd.domainname.com to the backend pool for https://client.wvd.microsoft.com/arm/webclient/.

    To create the routing rule, you would need to specify a host name like wvd.domainname.com in the Front Door configuration and configure it to route traffic to the backend pool for https://client.wvd.microsoft.com/arm/webclient/. You can also configure other settings like load balancing algorithms, SSL settings, and caching policies.

    Here is an example JSON configuration for a Front Door routing rule that forwards requests for https://wvd.domainname.com to the backend pool for https://client.wvd.microsoft.com/arm/webclient/:

    {
      "name": "WVD_Routing_Rule",
      "frontendEndpoints": [
        {
          "name": "wvdfrontend",
          "hostName": "wvd.domainname.com",
          "sessionAffinityEnabledState": "Disabled",
          "sessionAffinityTtlSeconds": 0,
          "webApplicationFirewallPolicyLink": null,
          "customHttpsConfiguration": null
        }
      ],
      "backendPools": [
        {
          "name": "wvdbackendpool",
          "loadBalancingSettings": {
            "name": "wvdlbs",
            "sampleSize": 4,
            "successfulSamplesRequired": 2,
            "additionalLatencyMilliseconds": 0
          },
          "backend": [
            {
              "address": "https://client.wvd.microsoft.com/arm/webclient/",
              "httpPort": 80,
              "httpsPort": 443,
              "priority": 1,
              "weight": 1
            }
          ],
          "healthProbeSettings": null
        }
      ],
      "routingRules": [
        {
          "name": "WVD_Routing_Rule",
          "frontendEndpoints": [
            {
              "id": "/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/frontDoors/<frontDoorName>/frontendEndpoints/wvdfrontend",
              "name": "wvdfrontend"
            }
          ],
          "acceptedProtocols": [
            "Https"
          ],
          "patternsToMatch": [
            "/",
            "/{**path}"
          ],
          "routeConfiguration": {
            "name": "WVD_Route_Configuration",
            "priority": 1,
            "backendPoolReferences": [
              {
                "id": "/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/frontDoors/<frontDoorName>/backendPools/wvdbackendpool",
                "name": "wvdbackendpool"
              }
            ]
          },
          "enabledState": "Enabled"
        }
      ]
    }
    
    

    This configuration specifies a custom domain name wvd.domainname.com in the frontendEndpoints section, a backend pool with one endpoint pointing to https://client.wvd.microsoft.com/arm/webclient/ in

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.