Thread: Subdomain DNS

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    1
    Rep Power
    0

    Subdomain DNS


    Hi, hoping someone can help me with my query!

    I have a script that allows clients to have a complete bespoke website, but they are all on subdomains under a single domain, example:

    client1.domain.com
    client2.domain.com
    client3.domain.com
    etc..

    I would like to know, how I can set up their domain names to point to their files on the server. For example I want to set it so that client1.com reads from client1.domain.com

    Also what will I need to do to allow the clients to have emails example info @ client1.com?

    I usually set emails up through my hosting CP but not sure if these need to be setup differently?

    Thanks in advance!
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    From a DNS perspective you would configure client1.com with an A record pointing at your web server or a CNAME pointing at client1.domain.com. Either way, you would then need to configure your web server software so that it serves client1.com from the appropriate directory on the file system.

    For email addresses, you would need to configure an MX record for the domain that points at your mail server. Then you need to configure your mail server to serve mail for that domain.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo