az appservice domain

Manage custom domains.

Commands

az appservice domain create

Create and purchase a custom domain.

az appservice domain show-terms

Show the legal terms for purchasing and creating a custom domain.

az appservice domain create

Create and purchase a custom domain.

az appservice domain create --contact-info
                            --hostname
                            --resource-group
                            [--accept-terms]
                            [--auto-renew]
                            [--dryrun]
                            [--privacy]
                            [--tags]

Examples

Accept the legal terms for purchasing and creating MyCustomDomain.com, then purchase and create domain.

az appservice domain create -g MyResourceGroup --hostname MyCustomDomain.com --contact-info=@'C:/path_to_contact_info.json' --accept-terms

View the details of the domain that will be purchased and created, without actually running the operation

az appservice domain create -g MyResourceGroup --hostname MyCustomDomain.com --contact-info=@'C:/path_to_contact_info.json' --dryrun

Required Parameters

--contact-info -c

The file path to a JSON object with your contact info for domain registration. Please see the following link for the format of the JSON file expected: https://github.com/AzureAppServiceCLI/appservice_domains_templates/blob/master/contact_info.json.

--hostname -n

Name of the custom domain.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--accept-terms

By using this flag, you are accepting the conditions shown using the --show-hostname-purchase-terms flag.

--auto-renew -a

Enable auto-renew on the domain.

default value: 1
--dryrun

Show summary of the purchase and create operation instead of executing it.

--privacy -p

Enable privacy protection.

default value: 1
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

az appservice domain show-terms

Show the legal terms for purchasing and creating a custom domain.

az appservice domain show-terms --hostname

Examples

Show the legal terms for purchasing and creating MyCustomDomain.com

az appservice domain show-terms --hostname MyCustomDomain.com

Required Parameters

--hostname -n

Name of the custom domain.