Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the urvanov-syntax-highlighter domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in C:\home\site\wwwroot\wp-includes\functions.php on line 6114
Azure Pack: change Web Sites Default Domain DNS Suffix – A Geeks World

Azure Pack: change Web Sites Default Domain DNS Suffix

To change the Default URL (DNS Suffix) for your Web Sites in Windows Azure Pack, follow these simple steps;

On the computer that is hosting the Web Sites Controller, run the following Windows PowerShell command:

Update (2014-07-14): It looks like the command above does not support -DnsSuffix anymore, but one of my readers has posted an alternative solution in the comments;

As an alternative you can use the following approach:

Check the change by using

And you’ll after that also have to do this:
On your SQL Server, open Management Studio.
In the Hosting Database admin.WebSystems table, change the
PublishingDns, FtpDns, and Subdomain to your desired URLs.

Restart your AzurePack servers to make the changes apply everywhere.

10 thoughts on “Azure Pack: change Web Sites Default Domain DNS Suffix”

  1. Thanks Robert for clarifying and keeping us updated!

  2. Update: Per a case I opened with Microsoft, the current way they recommend changing the suffix is to use one of the older (and deprecated) commandlets from the WebHostingSnapin.

    Add-PSSnapin WebHostingSnapin
    Set-HostingConfiguration -DnsSuffix “”

    You still need to update the admin table as before also.

  3. Sweet, thank you Robert! I saw that you posted in the Technet forum too, excellent.
    I’ll update my blogpost.

  4. One correction to Peter’s command: When using pipeline variables, you should not use the $. You are passing the variable name, not the variable itself. The correct line would be:

    Set-WebSitesConfig -Type Global -pipelinevariable Global

    For clarity, I would recommend against using a variable named “Global”

    Import-Modules WebSites
    $GlobalConfig = Get-WebSitesConfig -Type Global
    $GlobalConfig.DNSSuffix = “new-domain.com”
    Set-WebSitesConfig -Type Global -pipelinevariable GlobalConfig

  5. Thank you for that solution Peter! Very appreciated.

  6. As an alternative you can use the following approach:

    Import-Modules WebSites
    $Global = Get-WebSitesConfig -Type Global
    $Global.DNSSuffix = “new-domain.com”
    Set-WebSitesConfig -Type Global -pipelinevariable $Global

    Check the change by using
    get-WebSitesConfig -type Global | select DnsSuffix

  7. Hi, you might be running the command on the wrong Virtual Computer.
    I think it has to be done on the one with the Web Sites role “Controller”.

    Try:
    Import-Module WebSites
    get-WebSitesConfig -type Global | select DnsSuffix

    It should show you the current DnsSuffix if you are doing it on the right server.
    Also, try to type the command manually without copy & paste from the web, it happens that the – is translated into a similar but slightly wider minus.

  8. A parameter cannot be found that matches parameter name “DnsSuffix”… Any solution to this?

  9. Hi, I receive errors that Websites does not exist as a module. Is this because I am using Web Sites v2? If so, do you know how to solve this on V2? Thank you.

Leave a Reply