-3

I have the following configuration in the DNS server (1-configuration):

--------------------------------------------------------------------
Host name   |  IP address/URL        | Record Type  | MX Pref | TTL
--------------------------------------------------------------------
@           | awf.rhcloud.com.       | CNAME(Alias) |   n/a   | 1800
www         | http://example.com     | URL Redirect |   n/a   | 1800
mail        | domain.mail.yandex.net.| CNAME(Alias) |   n/a   | 1800

and MX part is

--------------------------------------------------------------------
HOST NAME   |  MAILSERVER HOST NAME  | MAIL TYPE  | MX Pref | TTL
--------------------------------------------------------------------
@           | mx.yandex.ru.          | MX         | 10      | 1800

in the above case MX record actuality does not working if I change @ and www as below MX starts working (2-configuration):

--------------------------------------------------------------------
Host name   |  IP address/URL        | Record Type  | MX Pref | TTL
--------------------------------------------------------------------
@           | http://www.example.com | URL Redirect |   n/a   | 1800
www         | awf.rhcloud.com.       | CNAME(Alias) |   n/a   | 1800

How can I make such that MX starts to work for the first configuration(without www). Is it possible, is there any tricks to do this?

Mirodil
  • 121
  • 1
  • 8
  • 1
    possible duplicate of [Can you reference a CNAME record in an MX record?](http://serverfault.com/questions/81402/can-you-reference-a-cname-record-in-an-mx-record) – Jenny D May 22 '15 at 08:54
  • 3
    Here it is not an issue of having an MX record referencing a CNAME, but instead having a CNAME in combination with other records types, such as in http://serverfault.com/questions/481243/cname-domain-to-another-domain-but-keep-different-spf-records-for-the-two – b0fh May 22 '15 at 09:10
  • @b0fh It's worse than that. Some of the record types are not even real types. – kasperd May 24 '15 at 22:30

1 Answers1

2

A CNAME record indicates that the name is an alias for another, for all record types. You are not allowed to have other record types for the same name when a CNAME is present.

Remove the CNAME for @ and replace it with explicit records (A, AAAA, SRV, etc) for all the types you need.

b0fh
  • 3,313
  • 1
  • 20
  • 32