Thread: Domain A Record

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

    Join Date
    Mar 2007
    Posts
    29
    Rep Power
    0

    Domain A Record


    Hi All,

    I would like to know if I can share a domain between 2 different hosts, one to manage email and the other to show the actual site.

    If I just change the A record of the domain to point to the new IP address where the website sits, would the email sub domain still work with the current host?

    Kind regards,
    Alex
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    289
    Rep Power
    45
    The "A" record points to the Web site.

    The "MX" record points to the Mail server.

    If the "MX" record is missing, the "A" record is used.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Location
    Stockholm, Sweden
    Posts
    16
    Rep Power
    0
    Originally Posted by Ruski
    Hi All,

    I would like to know if I can share a domain between 2 different hosts, one to manage email and the other to show the actual site.

    If I just change the A record of the domain to point to the new IP address where the website sits, would the email sub domain still work with the current host?

    Kind regards,
    Alex
    Is this what you're looking for:

    Webmail: webmail.domain.tld
    Regular website: www.domain.tld

    You want other users to be able to use webmail.domain.tld while e.g viewing their mail inbox or sending a mail?

    Your user's mail addresses will work as following:
    user@domain.tld

    not as: webmail.domain.tld

    The subdomain has nothing to do with the domain where people send mail to, after all, it's the mail server (Dovecot/Postfix) that decides the default host/domain to serve mail on.

    To do this, follow my instructions:

    1). Your DNS
    [webmail.domain.tld] [86400] IN [A] [server ip]

    2). Edit /etc/apache2/apache2.conf or /etc/httpd/conf/httpd.conf (path differs depending on your operating system)
    Code:
    NameVirtualHost xxx.xxx.xxx.xx:443
    <VirtualHost xxx.xxx.xxx.xx:443>
    ServerName webmail.domain.tld
    DocumentRoot /var/webmail/
    <Directory "/var/webmail/">
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>
    3). Restart apache (as sudoer), Note: apache2 is commonly used if you're on Ubuntu or Debian, httpd may be used if on RHEL or CentOS or similar.
    Code:
    service apache2 restart
    service httpd restart
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Location
    Brooklyn, NYC
    Posts
    34
    Rep Power
    3
    Yes you can. You need to edit Zone file. IP address of webserver - A record. IP address of mail server - MX record.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    4
    Rep Power
    0
    yes you have to edit your Zone file

IMN logo majestic logo threadwatch logo seochat tools logo