I have DNS server to my domain abc.com.

Need to point my sub domain xx.abc.com to another subdomain xx.def.com. As it's hosted in xx.def.com, I will get any IP, so they will provide only subdomain name xx.def.com. Will it possible to point my subdomain to other subdomain instead of IP in DNS record?

  • ... or if you want all the records for a subdomain pointed elsewhere, there's also the DNAME record. – thrig Apr 29 '16 at 15:23

As you are mentioning different domains abc.com & def.com, you use web server redirection of xx.abc.com to xx.def.com. For example the below sample syntax is used to do redirection in Apache server:

<VirtualHost x.x.x.x:80>
        ServerName xx.abc.com
        Redirect Permanent / xx.def.com

This will redirect all request coming from xx.abc.com to xx.def.com.

  • It worked with the web server redirection.. Thanks! – KKD May 25 '16 at 6:48

Yes, use a CNAME record. Exact syntax and details will depend on your software, but basically in place of writing something like this:

xx.abc.com. A

…you'll write something like this:

xx.abc.com. CNAME xx.def.com.
  • Will try with CNAME, Will it be faster than A record? – KKD Apr 29 '16 at 13:51
  • No, it's bound to be slower than A record because the resolver has to make an additional lookup to find out the address xx.def.com points to. Fortunately, this is a common thing, DNS has TTL fields, DNS software has caches—overall, the performance hit will be negligible. – Alexander Batischev Apr 29 '16 at 13:54
  • Mentioning CNAME to different domain def.com is not working.. As we have frequent changes in the IP address... – KKD May 25 '16 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.