简体   繁体   中英

Add many domains to an azure web site

I'm migrating a pretty serious multi-tenant application to Azure, and one of the challenges I see coming is that it hosts over a hundred domains.

On the Azure side, the only way I see to add a custom domain is hand-entering them via the portal. I would really like to script this out with Azure PowerShell or (perhaps less desirable for this one-off operation) one of the .Net APIs.

I did find this, which shows that it can be done with one of the REST APIs: Add a domain to an Azure web site via code

Is there anything for PowerShell?

you can use -

Set-AzureWebsite -Name "ramisample" -HostNames @('www.abc.com', 'abc.com')

Make sure you point the CNAME records before adding them as domains.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM