In a domain name space, a domain is a subdomain of another domain if it is contained within that domain.
This relationship can be tested by seeing if the subdomain's name ends with the containing domain's name.
For example, A.B.C.D is a subdomain of: