I would like to setup a subdomain on my VPS. I have read a tutorial(http://crm.vpscheap.net/knowledgebase.php?action=displayarticle&id=10), but I think it isn't for subdomains.

This section should be used only for one subdomain of my domain:

; BIND data file for linuxconfig.org
$TTL    3h
@       IN      SOA     ns1.linuxconfig.org. admin.linuxconfig.org. (
                          1        ; Serial
                          3h       ; Refresh after 3 hours
                          1h       ; Retry after 1 hour
                          1w       ; Expire after 1 week
                          1h )     ; Negative caching TTL of 1 day
@       IN      NS      ns1.linuxconfig.org.
@       IN      NS      ns2.linuxconfig.org.

linuxconfig.org.    IN      MX      10      mail.linuxconfig.org.
linuxconfig.org.    IN      A
ns1                     IN      A
ns2                     IN      A
www                     IN      CNAME   linuxconfig.org.
mail                    IN      A
ftp                     IN      CNAME   linuxconfig.org.

2 Answers 2


There's no real difference between a domain name and a subdomain name, they're both records in the DNS system.

You already have a www subdomain as a CNAME to your domain name, so you should be able to use that. Of course your server also needs to understand what it has to do when confronted with the subdomain name (mostly relevant to HTTP servers but also SMTP (emaiL) servers need to "know" that they should respond correctly to the subdomain).

  • I haven't set yet anything, it is only a sample.
    – plaidshirt
    Commented Dec 26, 2014 at 15:47

What is the subdomain that you are trying to setup?

You can do it in 2 ways:

Simplest way to do it is to add the following at the end of the zone above $ORIGIN subd.linuxconfig.org. ; SUBD is your subdomain. All records without a '.' in the end use ths suffix until the next origin @ IN A XXX.YYY.ZZZ.PPP www IN CNAME subd.linuxconfig.org. mail IN A XXX.YYY.ZZZ.ABC

  • I would like to add only a subdomain to my server.
    – plaidshirt
    Commented Dec 26, 2014 at 15:46
  • Then add the entries as you normally would. That should work just fine.
    – DerekC
    Commented Dec 27, 2014 at 14:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .