In Part one of this topic I showed how you could redirect a corporate URL to the WVD URL, so that your users would only need to remeber or bookmark a familar URL. That was using a few lines of code and an Azure Function app: http://xenithit.blogspot.com/2020/02/create-corporate-url-for-windows.html
This post shows how to acheive the same thing but using Azure Front Door to do so.
To set this up in Azure Front Door then follow these steps.
The first requirement is to have a Web App. If your just starting follow this simple guide and create yourself a free F1 App Service Plan.
Once that is created copy the URL for your web and then you can now create your Azure Front Door and URL Redirect Rule.
In Add a Resource in the Azure portal search for Front Door
Click on Create, choose or create a Resource Group
Step 1 is to create a Frontend, click on the + sign
Give your Frontend a name and click on Add
Now you create a Backend pool, click on the + sign
Give your Backend a name and click on + Add a backend
Select Custom host and enter the URL for your WebApp without the https://
Click on Add
On Routing Rules click on the + sign
Give your Redirect Rule a name.In Route Type select Redirect
In Destination Host select Replace and enter: rdweb.wvd.microsoft.com
In Destination path select Replace and enter: /webclient/index.html
Click on Add
Then Click on Review and Create and then the Create button to create your AFD.
Now go back to your Frontend hosts and copy your Frontend URL, enter that into a browser and again you will be redirected to the Remote Desktop Web Application.
Now you will need to add a Custom domain so that you can use a corporate URL to access this re-direction service and get to the RDWeb URL. That requires creating a new CNAME record that points your desired URL to this Azure Front Door front end URL
With Azure Front Door the CNAME record needs to already exist, and as it may take some time to propagate, do that now. As with the Function App, go to your DNS manager and add a new CNAME record for your domain i.e. myapps.contoso.com mapping to your Azure Front Door URL, i.e. wvd.azurefd.net
Whilst that propagates, the next thing we need to check is which Tier your App Service plan is on.
Custom Domains are not a feature of the F1 plan, so you will need to upgrade to a minimum of the B1 Plan.
Go to your App Service. This is the App service the Azure Front door is running within.
Go to Scale Up:
Select the B1 plan (or higher), ensure the plan you want is surrounded in blue. Click on Apply
Now go to your Azure Front Door designer and click on the + sign on the right hand side of your Frontend hosts:
As we already have a Frontend pool this will default to the adding of a custom domain.
In the Custom host name enter the URL you want to use which is the CNAME record you just created.
This will automatically check your DNS for the existence of this record.
Click on Add.
That has added the custom domain, now we need to add a routing rule for this custom domain.
In fact we only need to add it to our existing routing rule.
Back in the Azure Front Door designer in the green section for Routing rules Click on the existing rule you created earlier
In the resulting "Update Routing Rule" blade put a tick in the Frontend hosts and click on Update
Finally click on Save at the top on the left:
You have now created an Azure Front Door redirector for the RDWeb URL.
To test just enter your corporate CNAME record into your browser. It will get redirected to your Azure Front Door Frontend Host Pool, where your routing rule will redirect it to the RDWeb URL.
*Update, we released a new URL when we releaed the Spring Update set of capabilities: https://rdweb.wvd.microsoft.com/arm/webclient/index.html, this URL is backwards compatible whereas the first URL is not forwards compatible.