Check the following general rules and examples:
- use A Record if your environment is working over public IP
name1.mydomain.com > 111.111.111.111
name2.mydomain.com > 111.111.111.112
- use CNAME if you want to alias custom domain to environment name (requires domain binding)
name1.mydomain.com > env1.hosterdomain.com
name2.mydomain.com > env2.hosterdomain.com
- use ANAME if you need to redirect one DNS zone (root domain) to another with all of its subdomains being resolved over the same subdomains
mydomain.com > hosterdomain.com
As a result, any subdomain on your domain will be pointed to the appropriate one on the service hosting provider: {subdomain}.mydomain.com > {subdomain}.hosterdomain.com.
mynewcompany.com > myoldcompany.com
As a result, you can point all traffic from your old domain to a new one keeping all the subdomains the same: {subdomain}.mynewcompany.com > {subdomain}.myoldcompany.com.
mydomain.com > env1.hosterdomain.com (requires domain binding)
As a result, subdomains of your custom domain will point to the appropriate ones within the target environment: {subdomain}.mydomain.com > {subdomain}.env1.hosterdomain.com.