Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

A worked example

Single answer

You manage an Azure Application Gateway that uses the Standard_v2 SKU. You are adding a multi-site HTTP listener in the Azure portal.

Requirements:

  • One listener must accept requests for contoso.com itself and for any subdomain of contoso.com, such as www.contoso.com and shop.contoso.com.
  • The configuration must be accepted by Application Gateway when you save the listener.

Which host name configuration should you enter for the listener?

Choose one answer
Why

A multi-site listener on the v2 SKU can contain an array of up to five host names, and these names can include the * and ? wildcards. The wildcard *.contoso.com needs a dot before contoso, so it matches subdomains but not contoso.com. You must therefore list contoso.com as well. Regular expressions and the ** pattern are not valid host names.

  • Correct: Host type Multiple/Wildcard; host names contoso.com and *.contoso.com. A listener can hold an array of up to five host names. contoso.com covers the parent domain, and *.contoso.com covers its subdomains, so the one listener meets both parts of the requirement.
  • Not correct: Host type Multiple/Wildcard; host names **.contoso.com and contoso.com. Two asterisks together in one component of a host name (**) are listed as invalid, so this pattern is not accepted.
  • Not correct: Host type Multiple/Wildcard; host names ^(.+\.)?contoso\.com$. Host names cannot be given as regular expressions. Only the * and ? wildcard characters can be used to build a host name pattern.
  • Not correct: Host type Multiple/Wildcard; host names *.contoso.com and www.contoso.com. *.contoso.com requires a dot before contoso, so it does not match contoso.com. Adding www.contoso.com still leaves the parent domain unmatched.
  • Not correct: Host type Single; host name contoso.com. A single, non-wildcard host name matches only that one name. Subdomains such as shop.contoso.com would not be accepted.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free