Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IP Addresses for Domains and their Subdomains the same?

Tags:

ip

I would like to know. When a domain example.com has an IP address: 41.72.111.222, would any of its subdomains (sub.example.com, mail.example.com etc) have the same IP address listed in the DNS records? Or does it work like this: A request is sent from the browser to the DNS server for sub.example.com. The DNS server returns the IP address for example.com, and the split/differentiation is made when the request for sub.example.com hits the example.com host server? So the host server basically know what to do with sub.example.com and not the DNS server?

like image 260
DextrousDave Avatar asked Jul 19 '12 13:07

DextrousDave


People also ask

Can domain and subdomain have same IP address?

It can kind of be a combination of both. Ultimately, though, the decisions are made based on what you set your DNS settings to be. Your host (or hosts) will then get whatever traffic you determined they should get in your DNS settings.

Do subdomains have an IP address?

A hostname is a domain (or subdomain) name that has at least one associated IP address.

Can two domains have the same IP address?

It is not possible to provide two domain names for the same Server IP address and get two different SSL certificates (one for each domain name). Also note that the use of Host Headers (which is how you can use a single IP for more than one SSL enabled domain) is not recommended for E-Commerce sites.

What is a subdomain IP address?

A subdomain is an additional hostname of a domain. Subdomains can point traffic to a specific IP address or other parts of a website.


Video Answer


1 Answers

It can kind of be a combination of both. Ultimately, though, the decisions are made based on what you set your DNS settings to be. Your host (or hosts) will then get whatever traffic you determined they should get in your DNS settings.

So for example...

You can set your DNS settings to take [anything].example.com and always direct that to your server. You would do this by adding a wildcard entry to your DNS subdomains. Wildcard entries use a * symbol to mean "anything". You would then need to configure your server to know what to do with all these different potential subdomains it could be receiving.

At the same time, you can set specific subdomains to go to other hosts. For example, if you wanted mail.example.com to go to some other webmail host, you would set up in your DNS the subdomain "mail" and have that traffic redirected to wherever you were hosting your webmail.

like image 70
rgbflawed Avatar answered Sep 24 '22 23:09

rgbflawed