Mobile app version of vmapp.org
Login or Join
Kristi941

: Do I need a subdomain or CNAME? I have a domain with Godaddy (mysite.com) which is pointing to my AWS EC2 box. Now I need a launchpad link on my website so that if the user clicks on it

@Kristi941

Posted in: #Apache2 #Cname #Subdomain

I have a domain with Godaddy (mysite.com) which is pointing to my AWS EC2 box.

Now I need a launchpad link on my website so that if the user clicks on it it would point to launch.mysite.com

This link should also point to the same AWS EC2 box and in there I would then capture the incoming host through Apache's VirtualHosts and redirect it accordingly.

What confuses me most is now how to create the launch.mysite.com ?

Do I create a 'forward Subdomain' and forward it to my ip? Or Do I create a CNAME pointing to the same ip?

Many Thanks,

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Kristi941

1 Comments

Sorted by latest first Latest Oldest Best

 

@Rambettina238

A CNAME record is used to point to another hostname. For example, sub.domain.com can point to my.other.site and my.other.site would have an A-record to for example, 123.231.312.123. CNAME and A-records are BOTH a type of subdomain. The only difference is how it's resolved.

The only benefit of using CNAME records, is that if you have a lot of subdomains pointing to one IP, you don't have to update them all manually if the IP changes, rather you update the record that the CNAME records point to.

A-records are marginally faster, because the system will connect directly to the end-server, rather than performing a lookup to resolve the CNAME to an IP.

Now in your case, if you already know how to use VirtualHost directives, and your DNS host supports it, you could point * to IP-ADDRESS which means, a wildcard subdomain *.domain.com pointing to either the hostname or the IP of your Amazon box. This would be very expandable in the future because if you have, for example, launch2.example.com it's already pointed to the Amazon box. (As are monkey.example.com and sdg91nfadug.example.com).

Or, you would just create a CNAME or A-record for just launch.example.com pointing to a hostname or IP respectively.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme