Creating an Azure website using  Portal, Powershell and CLI

Creating an Azure website on Microsoft Azure Cloud starts with creating the unique DNS name, specifying the region the website will run in on Microsoft Azure Cloud starts with creating the unique DNS name, specifying the region the website will run in, and adding resources such as a Microsoft Azure SQL Database or Microsoft Azure Storage account. In other words, you are designing the infrastructure for the website that the web application will utlilize. These are the equivalent approach you take in an on-premises environment where you create a website in IIS Manager. When you do this, you simply create the site without any code. Later, application code is published to the site that users can reach through their browser.

A Microsoft Azure website can be created using a variety of tools, such as the following:

  • Microsoft Azure management portal at https://portal.azure.com
  • Azure PowerShell cmdlets
  • Many other UI and command-line tools

Creating an Azure website using the Azure management portal

Using the Azure management portal to create an Azure website provides is an easiest option as it provides a rich and powerful UI experience. You can choose to create your website using a variety of templates. Some templates provide the option to include a database resource such as a SQL Database, MySQL Database, or Azure Storage account. Other templates can be used to create a fully functioning website for popular blogging and content management systems (CMSs), e-commerce, and more. All templates available are in the Web page in the Azure Gallery, as shown in Figure 1.

Creating an azure website 1

FIGURE 1 Web page in the Azure Gallery showing some of the templates available for creating an Azure website

Creating an Azure website using Azure PowerShell

Creating an Azure website using the Azure PowerShell cmdlets requires that you know the location (or region) you want to create the site in and a unique name for the site. To determine
the website locations that are available to your Azure subscription, use the following Azure PowerShell cmdlet.

Get-AzureWebsiteLocation

An Azure PowerShell cmdlet reference is available at https://msdn.microsoft.com/enus/library/azure/jj554330.aspx.

You can also get detailed help on a cmdlet using the PowerShell Get-Help cmdlet.

The result will be a list of locations that are available to your subscription. To determine if an Azure website name already exists, use the following Azure PowerShell command.

Test-AzureName -Website "contoso-web"

The result will be either true or false. If it is true, then the name speciied already exists and therefore cannot be used. If it is false, then the Azure website name does not exist and therefore would be a valid unique name you can use. To create the website, use the New-AzureWebsite cmdlet, specifying the location and name parameters as shown in the following example.

$wsLocation = "West US"
$wsName = "contoso-web"
New-AzureWebsite -Location $wsLocation -Name $wsName

All Azure Websites are created in the Azurewebsites.net domain. If you name your website Contoso-web, it will be reachable using the URL contoso-web.azurewebsites.net

This article is a part of 70-533 Implementing Microsoft Azure Infrastructure Solutions Prep course.

More Articles included in this course are

article

Custom domain for Azure website

Configuring a custom domain for Azure website Azure websites are distributed to the common azurewebsites.net domain. If your website title ...
Read More
article

SSL certificates for an Azure website

Configuring SSL certificates for an Azure website Azure website fully supports SSL certificates by default. For example, if your website ...
Read More
article

Azure Traffic Manager

Configuring Azure Traffic Manager Azure Traffic Manager refers to a network service which can be used to route users to ...
Read More
article

Handler mappings configuration for an Azure website

Configuring handler mappings It is essential to configure the added handlers or interpreters to assist the website code in accordance ...
Read More
article

Virtual applications and directories for an Azure website

Configuring virtual applications and directories for an Azure Website There are certain websites which may require virtual applications or directories ...
Read More

Practice Tests in this course are

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 6

Instructions for Exam 70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 6 This page shows the instructions for Exam 70-533 ...
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 7

Instructions for Exam 70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 7 This page shows the instructions for Exam 70-533 ...
Read More