CNAME and MX records

Discussion in 'Server Operation' started by Wandering-Aimlessly, Jul 27, 2009.

  1. Wandering-Aimlessly

    Wandering-Aimlessly New Member

    Hi, I have been doing some reading but seem to find conflicting info.

    I host a domain whilst the website is being maintained on another by another company (complicated story).

    I still host the email and do spam filtering and I am using "A" records for "www.domain.com" and "domain.com"

    The other company will soon ask me to change the DNS to use a CNAME for the website.

    The question is, can I still set up a CNAME for "www.domain.com" and "domain.com" whilst still having the email remain on my server ?

    Geee, I do hope that makes sense !


    Thanks for reading.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Yes, but make sure that your MX record points to an A record (CNAMEs are not allowed for MX record). For example, you could create an A record for mail.domain.com which points to your server, and then you change the MX record so that it points to mail.domain.com.
     
  3. Wandering-Aimlessly

    Wandering-Aimlessly New Member

    Thanks Falko.

    So, just to be sure I understand correctly:

    www.domain.com IN CNAME anotherdomain.com
    domain.com IN CNAME anotherdomain.com

    Will cause any access to the website will go to the hosting for anotherdomain.com



    And :-

    mail.domain.com. IN A 123.123.123.123
    domain.com. IN MX 5 mail.domain.com.

    Where 123.123.123.123 is the IP where this record exists will cause the email to stay on this server.


    Sorry to be a pain, I really do appreciate your help.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    It just means that requests for www.domain.com and domain.com go to the same server where anotherdomain.com is, but it doesn't mean you will see the contents of anotherdomain.com in your browser. That is up to the http server configuration.



    Yes.
     

Share This Page