Windows Azure Pack – change web sites default domain – Web Sites v2 update rollup 4

I recently had a POC WAP environment where the client wanted the web sites default domain changed. Ordinarily you can’t do this through the web ui nor is it recommended.. But that does not mean it’s not possible..

As the title suggests, this change applies to Windows Azure Pack Web Sites Version 2 – Update Rollup 4. More info found here – http://support.microsoft.com/kb/2992029

 

Firstly, take a look at the config:

We do this with the Get-WebSitesConfig PowerShell command with Global parameter (http://technet.microsoft.com/en-us/library/dn450946(v=sc.20).aspx)

Get-WebSitesConfig -type Global

In the output we see the property called DnsSuffix which has the existing domain.

Let’s change this!

 

$Config = Get-WebSitesConfig -Type Global
$Config.DNSSuffix = “newdomain.net”
Set-WebSitesConfig -Type Global -pipelinevariable Global

Check out our handiwork:

Get-WebSitesConfig -type Global | Select DnsSuffix

 

We’re not finished yet though……

 

Remember when setting up the hosting platform you defined the urls for the publishing & ftp sites?… Well they need updating as well.

This is done in SQL.

 

In SQL Management Studio, expand the Hosting DB and find the admin.WebSystems table. Choose “Edit top 200 Rows” and modify the PublishingDns, FtpDns and Subdomain properties to the desired values.

 

Bounce the WAP Servers and after a bit of settling, you should be good to go!

 

Cheers’
Dan

Leave a Reply

Your email address will not be published. Required fields are marked *