Mobile app version of vmapp.org
Login or Join
Dunderdale272

: Do subdomains need to be defined through domain registrar? I have bought a new domain name from GoDaddy. Let's say it is abcd.com. On GoDaddy's DNS Managing page, I changed A(Host) part to

@Dunderdale272

Posted in: #Godaddy #Subdomain

I have bought a new domain name from GoDaddy. Let's say it is abcd.com.

On GoDaddy's DNS Managing page, I changed A(Host) part to
@ = 74.125.232.215


which is google.co.uk's IP address.

Now if I type abcd.com, it directly goes to google.co.uk.
But if I type test.abcd.com, it cannot be loaded.

Do I need to define every subdomain through GoDaddy? Is this how it works?

P.S. Amazon EC2 directly generates a subdomain for users to reach
their virtual PCs. It cannot be domain registrar dependant.

P.S.2. Same question for using "www2" at the start of url.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Dunderdale272

2 Comments

Sorted by latest first Latest Oldest Best

 

@Ogunnowo487

Just to add to ionFish's very comprehensive answer,


Do subdomains need to be defined through domain registrar?


They don't need to be defined through the domain registrar, but wherever the master DNS records are located. At the moment they are at GoDaddy, but if you changed the NAMESERVERS on your domain at GoDaddy to point to an alternative DNS server, you would change the DNS at that alternative DNS server, not GoDaddy, which is still the domain registrar.

10% popularity Vote Up Vote Down


 

@Ravi8258870

Google does NOT like when you set your A-records to them (they set it so if domain != 'google' then redirect to google.[com] and therefore preventing people from using Google under their own domain)

The @ means "naked domain" so it would be "abcd.com" and you DO need to specify a www record (as well as test) to whatever IPs you want them to go to. If it is supported, you can do * instead of @ which would make wildcard.abcd.com go to that IP.

Amazon generates a subdomain for its users, because their servers are (for the most part) shared. The only way to differentiate between two users is to identify it by name, thus the server does what is called a VirtualHost where it can serve [the correct user's content] by "listening" for that identifier.

Picture it like this: you're at work, with 50 other people, in a room together. Someone comes in and says, "I need to speak with John Hancock!" and so [the room is the "server"] will send John Hancock to speak with the person [where John is the "correct website"].

If you have a domain and try to access test.abcd.com but it's not defined in the DNS, you will get a "unknown host" error, since hte DNS server has no data for it (Like if there was no John Hancock in the room) and would return an error (everyone looks around for John and then ignores the request).

But you'd rather point the www A-record to the IP (or make a CNAME record to the hostname) of [your Amazon server?]. Not to Google. The difference between an A and CNAME record, is that A-records can ONLY go to IP addresses (AAAA records are for IPv6) and CNAME records ONLY (for the most part) go to hostnames. A-records are faster to load on the end-user, because their computer has to only look up the IP of the host you set it to, whereas a CNAME record is safer to use (if the IP changes, you only have to update the other host, not all the A-records) but is marginally slower, because the end-user has to look up both the first host, and then resolve the second host.

And finally, the www2 subdomain. You need to create this separately as well (unless you wildcard your naked domain). But on your [web host] you should specifically make it listen for these different subdomains. What's the purpose of using www2 on top of www if the content is the same and it's on the same server?

And for extreme clarity: you should pick whether to serve content on the naked domain (abcd.com) or the www subdomain (www.abcd.com) but not both. (For reasons to be explained later if you ask due to length).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme