3

I am not very familiar with technical DNS setup.

I have this scenario:

  • I have one domain, say it is: mydomain.com
  • I have multiple servers: each=one ip address

I want to know if it is possible to use the same domain name for all servers, for example: s1.mydomain.com points to server 1's ip, s2.mydomain.com points to server 2's ip...

4
  • 3
    Why not just use separate A records pointing to each IP? This isn't very technical. Dec 24, 2020 at 9:00
  • What should I put in the host field? Actually there is @ symbol for the main domain Dec 24, 2020 at 22:39
  • 1
    You would put the subdomain you want (for example s1 for server 1)......... Dec 24, 2020 at 23:05
  • Take a look at the following link and you may have a better understand how AD works:serverfault.com/questions/402580/…
    – Candy
    Dec 25, 2020 at 2:43

1 Answer 1

5

Is it possible to use the same domain name for all servers?

Yes, but (arguably) this doesn't appear to be what you are asking about. That is, it is possible to have a single domain (e.g. example.com) that is serviced by multiple (duplicated) servers.

What you appear to be asking about are subdomains. In short, it is possible to assign separate IPs to separate subdomains in DNS, so that subdomains s1.example.com, s2.example.com, s3.example.com etc. are all serviced by different servers (IP addresses). You simply need an e.g. A record for each subdomain.

What should I put in the host field?

You don't specify what DNS setup you are using, but typically this would be the subdomain (e.g. s1, s2, s3 etc.)

There is an @ symbol for the main domain.

At least in BIND, the @ symbol is a shorthand way of referencing the zone root or zone apex (often e.g. example.com). This entry is generally necessary. You would add additional A records for each subdomain.

5
  • Thank you for your answer. I am using godaddy, ot appears that you have just to put the subdomain part of your subdomain.maindomain.ext and I just did so. I am waiting for the result it appears to take some time. Jan 13, 2021 at 21:44
  • I would like to ask two follow up questions: Jan 13, 2021 at 21:44
  • Is there a limit for the number of subdomains allowed? Or does it depend on the provider? Jan 13, 2021 at 21:45
  • And, is there a way to make the changes take place more faster? Jan 13, 2021 at 21:46
  • 3
    Any limit on the number of subdomains would depend on the provider (assuming they imposed a limit at all). Regarding making changes "faster", if the DNS provider allows access to the TTL (time-to-live) for the your DNS records, you can reduce this value. Essentially, TTL tells other tells a DNS resolver how long to cache a query before requesting a new one. 1800 seconds (30 minutes) is a common, relatively "quick" default. That said, there is likely no real way to speed up the initial record distribution process (i.e. just after you create a subdomain). Jan 15, 2021 at 22:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .