0

I have a registered domain with my name.

I want to have multiple servers, with different names, hosted on the same physical host.

This is easy to do using reverse proxy (I am currently using nginx). Problem is I need to configure DNS on my provider site for each and every site I set-up; this is inconvenient.

Is there some way to say to DNS there's a "default" IP for the whole domain? I would like to tell DNS "if domain is XXX.yy and you can't find a better fit then default to xxx.xxx.xxx.xxx".

Is this possible? If so how?

slm
  • 7,355
  • 16
  • 54
  • 72
ZioByte
  • 246
  • 3
  • 15
  • Your question is ambiguous. Are you saying you need to create DNS entries inside each company that wants to access the servers? Why can't you use public DNS so anyone can look up the server IP from the domain name? You need a DNS entry for each domain. – Tim Jun 17 '18 at 07:38

1 Answers1

1

It's possible to point every sub-domain to the same IP address using wildcard DNS as specified in RFC 4592 The Role of Wildcards in the Domain Name System, e.g.

*.example.com. IN A 198.51.100.100

This points every non-existent subdomain to 198.51.100.100, fulfilling by default your definition of not finding a better fit. This has some limitations i.e. if you have sub1.example.com., the *.example.com. won't cover *.sub1.example.com. See the example from section 2.1.1.

I can't say whether your "provider site" supports adding wildcard records or not: you must ask them.

Esa Jokinen
  • 43,252
  • 2
  • 75
  • 122