cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

Two IPs, two A records, multiple (wildcard) subdomains for one of them which is a subdomain too.

Hello.

 

I have two servers (10.0.0.1 and 192.168.0.1). The first one is for Production PROD and the second one for QA.

 

Domain: mydomain.com

A -> @ -> 10.0.0.1 (resolves mydomain.com) aka PROD

A -> qa -> 192.168.0.1 (resolves qa.mydomain.com) aka QA

 

Now, I will have multiple subdomains, such as...

oath.mydomain.com

api.mydomain.com

registry.mydomain.com

 

I also will have multiple matching QA domains

oath.qa.mydomain.com

api.qa.mydomain.com

registry.qa.mydomain.com

 

I would like to be able to * (wildcard) any subdomains for mydomain.com and also for qa.mydomain.com without having to come to the DNS manager and manually adding them. The idea is that I may even generate random subdomains that would need to match (the first portion) between PROD and QA

{whatever}.mydomain.com

{whaterver}.qa.mydomain.com

 

I tried a combination of CNAMEs (*.qa.mydomain.com => qa.mydomain.com) to not avail.

 

I've seen that other people have achieved this but apparently, GoDaddy is not as sophisticated as other DNS Managers.

Is this even possible on GoDaddy? If not, anyone can point me to a DNS Manager that will allow me to achieve this? 

 

Thank you

1 REPLY 1
Solution

Re: Two IPs, two A records, multiple (wildcard) subdomains for one of them which is a subdomain too.

I figured it out. Not sure if this is the most elegant solution, but it works. 

 

Adding three new A records as follow, solves the issue.

 

A -> *.qa -> 192.168.0.1

A -> * -> 10.0.0.1

 

So, apparently, the first one cascade everything that is a subdomain of qa.mydomain.com. The second one, cascade everything that is a subdomain of mydomain.com AND is not qa.mydomain.com. 

 

I tried to delete the A record for QA and I got *** Can't find qa.mydomain.com: No answer. I put it back and now works like a charm.

 

If anyone has a better solution, I will be glad to hear about it.