This documentation is archived and is not being maintained.


This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The SubdomainOf function tests whether one domain is a subdomain of another specified domain.


bool SubdomainOf(
  string uri,
  string uriTemplate



The URI to test for subdomain membership within uriTemplate.


A domain.

Return Values

Returns true if uri is a subdomain of uriTemplate; false if it is not.


Parameter values must include the scheme portion of the URI, for example "".

For SIP URIs (URIs that begin with "sip:" or "sips:"), this function performs a postfix match on the domain. For example, "" is identified as a subdomain of "".

The wildcard character ("*") and regular expressions are not supported.