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?
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.
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 havesub1.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.