Reputation: 11
I have a system with a URL like sub.domain.tld that resolves to a local server. I'm looking to create a cloud-based system where I would like to resolve all requests for *.sub.domain.tld, while still resolving sub.domain.tld to the local server. Is this possible?
Upvotes: 1
Views: 218
Reputation: 71
Yes, you can set sub.domain.tld to have an A record set to 10.0.0.1 (or whatever internal IP you want), and also have foo.sub.domain.tld with an A record set to 1.2.3.4 (or any other IP).
You can even have a wildcard subdomain like *.sub.domain.tld with an A record of 1.2.3.4 and then anything.sub.domain.tld will resolve to 1.2.3.4.
Another option is to delegate control to another DNS provider. Add foo.sub.domain.tld to the new DNS provider as a main domain, and in the sub.domain.tld DNS config, set NS records on foo.sub.domain.tld that point to the other nameservers. Then from the new account you can independently add new DNS records like bar.foo.sub.domain.tld, which can be handy when you want to give someone else control of a subdomain, or when you just want to isolate different environment configs.
You can also override public DNS for local DNS queries in a variety of ways if that's desired, e.g. via hosts file entries.
There are a lot of options depending on what you want to do.
This is all assuming this is public DNS on a public domain. You can also use private domains in private DNS servers, which is fairly common to see in enterprise networks.
Upvotes: 2