0

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       192.168.0.10
ns1                     IN      A       192.168.0.10
ns2                     IN      A       192.168.0.11
www                     IN      CNAME   linuxconfig.org.
mail                    IN      A       192.168.0.10
ftp                     IN      CNAME   linuxconfig.org.
0

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 Dec 26 '14 at 15:47
0

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 Dec 26 '14 at 15:46
  • Then add the entries as you normally would. That should work just fine. – DerekC Dec 27 '14 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.