DNS: How to make external domain point to subdomain(s)
I read the DNS part of the library but it is still not exactly clear to me what steps have to be taken in which order at:
a) the external name server for the domain
b) on the linode (define subdomains?)
c) elsewhere?
Thanx a lot for any help!
1 Reply
The below is fairly generic, so not all of it may be relevant for what you are actually trying to do.
When it comes to DNS, there are a few pieces, some or all of which may be handled by the same provider.
3. Your registrar who handles your domain.
The host(s) that have the authoritative DNS for your domain.
The host(s) that have authoritative DNS for a sub-domain.
So let's say your domain is example.com. You have obtained example.com through your registrar, whose job it is to register that domain and tell the root nameservers (which technically configures the .com delegate servers). As part of that process you must provide at least one but usually several authoritative nameservers.
Those nameservers can be with the same provider (often basic DNS is bundled with domain registration) or can be on a third party, including the DNS servers Linode offers, or can be your own machines. These are the nameservers shown in a whois lookup for your domain. If you want to change them (say, to start using Linode's nameservers rather than a current provider) you need to prepare the target provider to have your DNS information (e.g., add your domain and records) then instruct your registrar about the new nameservers. It's your DNS provider that you use to make changes to DNS information within example.com. In most cases this is where you do all your work and edit any records you find necessary.
Lastly (and less commonly), if you have actual sub-domains that you wish to delegate elsewhere, you can have them have their own independent authoritative nameservers. So let's say that corp.example.com is handled separately from example.com. It's your job then to place NS records in the example.com DNS hosts so someone looking things up can determine that they need to go elsewhere. It's also possible to have a case where you wish to manage your DNS as a collection of sub-domains, but without needing delegation (I have a case like this in a franchise system). In that case, everything is still on the same set of DNS servers, but managed as separate domains for convenience, so the delegate NS records aren't strictly needed.
The above is just the domain structure and how the right nameservers are located to resolve names. It's the individual records (e.g., an A record for "
Given the above, it now depends what you mean by "I would like one (or multiple) subdomain(s) of my domain point to a linode IP address. ".
If you have the domain example.com and just want somename.example.com to point to a Linode IP address, just use whomever's DNS service you are using to add an A record for "somename" that has whatever IP address you want. If you are using Linode's DNS for example.com (e.g., you've given your registrar the nameservers ns1-ns5.linode.com as the domain nameservers) you can do this through Linode's DNS Manager.
If you want a separate domain somedomain.example.com, into which you are going to place other records, it's still probably simpler to add records at the main domain, so for example a record for "
If you want really separate domains, you will need to create a new domain with your DNS provider, and then you can add the individual records (e.g., "www" above) to that new domain. As long as the sub-domain is served by the same exact set of nameservers as the main "example.com" domain (true if using Linode's DNS) you don't need any additional NS records, but if your DNS provider allocates unique DNS servers to each domain created, you'll need to also add matching NS records to example.com.
– David