Modern Workplace Brewer, MVP & MCT

When you read the title like this, you think "That could be pretty handy!". So that's why I put it in writing.
I had this a recent customer, where I migrated them from an on-prem RDS farm to Azure Virtual Desktop.

Why would you choose to change the current url of Azure Virtual Desktop ( to something else?

  • It's a pretty long url. It is difficult to pass it on to an end user
  • 🤔

Andddd I can't think of anything else for now.

So, what I want to achieve is to get that long url to a shortened url, e.g. avd.domain.tld. This can be done, with the help of Azure, in 2 ways.

  1. A Static Web App
  2. A Function App

Now my Function App is broken. That's because Microsoft made a change to it and I haven't had time to figure this out yet. But the customer wants to move on.
So, in this blog post, I'm going to focus on how to use a Static Web App.

First of all, you need a GitHub account and repo for the "website". You can copy/fork my "website" from my GitHub account 👇.

scripts/avd-url-redirect at main · BurgerhoutJ/scripts
Contribute to BurgerhoutJ/scripts development by creating an account on GitHub.

What we need:

  • Azure subscription
  • GitHub account and repo for the "website"
  • Static Web App
  • Access to the DNS service

Let's get to work.

  1. Log in to
  2. Click on Create a resource
  3. Search for Static Web App and click on Create
Figure 01 - Azure Static Web App
  1. Choose as Deployment Source for GitHub
  2. Connect your GitHub account
  3. Choose the repository
  4. Choose the branch
  5. At App location field, fill in "/" as root or in my case "/avd-url-redirect" as rootmap of the "app"
Figure 02 - Static Web App configuration
  1. Click on Review + create
  2. Click on Create and the web app will be configured
Figure 03 - Review and create
  1. After the Static Web App has been built, you will see a overview like the below image.
Figure 04 - Overview Static Web App
  1. You can open the "website" by clicking on the url in the top right of this overview blade.

Now we need to add a custom domain to this Static Web App.
13. Click on Add a custom domain
14. Click at Custom domain on Azure DNS or Custom domain on other DNS. I have an other DNS provider, so I choosed the 2nd option.

Figure 05 - Add custom DNS options
  1. Fill in your custom domain name and click on Next
Figure 06 - Fill in custom domain name
  1. Choose for CNAME
  2. Copy the displayed DNS record in to your DNS service.
  3. Click on Add
Figure 07 - CNAME record
Figure 08 - Custom domain is added
  1. Your custom domain is added to the Static Web App.

From now on, you can reach your Azure Virtual Desktop environment via your custom, company branded, url.


Video 01 - Redirect in action

That is it for now. Until next time. 👋 🍻

You’ve successfully subscribed to Jeroen Burgerhout
Welcome back! You’ve successfully signed in.
Great! You’ve successfully signed up.
Success! Your email is updated.
Your link has expired
Success! Check your email for magic link to sign-in.