Where can I read about A-record subname?

I’m trying to understand the A-record, but I’m stuck with the “subname”.
I expect the subname to refer to different vhosts at the server. My plan is to configure my webserver (apache) with a vhost called foobar, and make a desec A-record-entry with subname foobar, and the expect things to work out fine.
Unfortunately it doesn’t work that way :slightly_frowning_face:

What I want to achive
I have a perfectly well operation webserver running for another domain. Now I want to have the same webserver serve another domain as well (in another vhost). I only have one static IP-address.

Who can explain A-record subname for me - or help me with my desired setup?

Thanks in advance

Hi rasved!

You seem to be mixing up two unrelated concepts: DNS and virtual hosts. Your question is about DNS A records but it seems your actual issue is with setting up virtual hosts?

deSEC is a DNS service and as such it takes part in translating human readable names to information understood by machines, such as IP addresses. E.g. a DNS A record points to an IPv4 address, a DNS AAAA record points to an IPv6 address, a DNS CNAME record points to another DNS name and so on. Once that translation has happened on the client side DNS does not come into play anymore. The browser sends its requests to IP addresses not hostnames.

However the HTTP Host: header and the SNI used for HTTPS are derived from the hostname of the URL the user entered in the browser. And this same hostname is also what is used as input to the DNS resolver to determine the IP of the server. So this hostname but not DNS is what matters for your webserver to differentiate between different websites on the same IP/Port combination.

If you need more specific help with setting up virtual hosts you need to provide more information, such as what server software you are using and whether HTTPS is being used. Also this would be off-topic for this deSEC discussion forum as deSEC is only a DNS service.


@fiwswe already answered what subnames are not for.

For completeness, here is what they are for: When you have a DNS zone e.g. foo.dedyn.io, you can add multiple “subdomain” A-records by filling the subname field. When you leave it empty, foo.dedyn.io will resolve to your configured IP. When you put bar, then bar.foo.dedyn.io will resolve to your configured IP. And when you add a *, all subdomains (regardless how deep, except the domain itself) will resolve to your IP address. So in this example bar.foo.dedyn.io as well as baz.foo.dedyn.io as well as bar.baz.foo.dedyn.io, but not foo.dedyn.io will resolve to your IP.

In case you run a webserver on that IP, you still need to configure this webserver to understand all these vhosts and return sensible pages.