How to Add Custom Domains to Azure Web Apps Using Powershell

Just another quicky post:

If you need to add a custom domain to an Azure Web App you can use Powershell.  Powershell does the same verification that the UI does and is just another way to accomplish setting the custom domain or domains.

Note that you don’t set, nor can you change the default domain.

Here is an example.  Lets say I have an azure webapp: and I want to add the and sub domains to it.  Assuming I have set this up already with my domain provider here is how I do it in powershell:

Get-AzureWebsite -Name "jsandersprod" | Set-AzureWebsite -HostNames @("",

That is all there is to it!

Please drop me a note if you found this useful!

Comments (2)
  1. good info Jeff. Thanks!

  2. Soju Sebastian says:

    Cool, thank you! Exactly what i was looking for.

Comments are closed.

Skip to main content