REAL Subdomains under Linode

While trying to add a sub-domain to my Linode account, I did the typical Google search to see if someone else had done so already, and I could just copy their instructions. Alas, there were plenty of posts titled “Subdomain on Linode” (or something to that effect), but they all only showed how to register a host under the DNS, and set up the <VirtualHost> records under Apache.

A host is not the same as a sub-domain.

Let’s assume we have a domain “mydomain.com”. Adding in “lab.mydomain.com” as an “A” record will simply make a host. You cannot then do “work.lab.mydomain.com” using this method – something which should be perfectly acceptable under an actual sub-domain.

Herewith, I present the correct procedure for adding in a sub-domain under the Linode DNS (using the above example of “mydomain.com”).

  1. Under the Domain zone for “mydomain.com”, add in the following “NS” records:
    1. ns1.linode.com -> lab.mydomain.com
    2. ns2.linode.com -> lab.mydomain.com
    3. ns3.linode.com -> lab.mydomain.com
    4. ns4.linode.com -> lab.mydomain.com
    5. ns5.linode.com -> lab.mydomain.com
  2. Create a new domain zone for “lab.mydomain.com”

Presto. You can now add in host records such as “www.lab.mydomain.com” or whatever you want.

One thought on “REAL Subdomains under Linode”

Leave a Reply

Your email address will not be published. Required fields are marked *