1

I had records in my DNS panel:

subdomain   type        domain                      priority (for MX)
@           CNAME       app-***.rhcloud.com.
@           MX          mx.yandex.ru.                  10
mail        CNAME       domain.mail.yandex.net.
www         CNAME       app-***.rhcloud.com.    

Abd so, first line overwrite other.

Question: what to do with that all? I can't create A record because IP of app-***.rhcloud.com. can be dynamic.

MadHatter
  • 79,770
  • 20
  • 184
  • 232
MInner
  • 109
  • 6

3 Answers3

5

Your @ record can't be a CNAME without side effects, one of which is breaking MX records.

RHcloud.com appears to be down, but you'd need to ask them how they handle these "apex records".

ceejayoz
  • 32,910
  • 7
  • 82
  • 106
  • How does a `CNAME` @ record break `MX` records? In his case, his `MX` is pointed to a totally different domain. I know some MTAs will fall back to using the `A` record of a domain if no `MX` exists, but that doesn't actually "break" the MX record. – Wesley Apr 02 '13 at 19:30
  • 3
    @WesleyDavid CNAME records can only coexist with records related to DNSSEC anything else is a violation of rfc2181 section 10.1. This would be the same reason why @ cannot use CNAME (i.e. it cannot coexist with SOA and NS records). Actual implementation in nameservers may vary. – 84104 Apr 03 '13 at 22:09
  • @WesleyDavid `CNAME and other data error` is the usual complaint -- in this case you'd have a `CNAME` that has the same name as (at least) the `SOA`, which is verboten per the RFCs 84104 quoted .(I believe BIND throws a fit about such things and refuses to even load the zone until you read the RFC and perform an act of contrition) – voretaq7 Apr 04 '13 at 18:40
  • We should mention that you may have an A ("address") record for @. That's very common so people can use URLs where the hostname in the URL is only the domain name. So you can lookup the IP of the CNAME and put an A record with that IP address. – Craig Constantine Apr 04 '13 at 19:32
0

Yes A records are dynamic with OpenShift service but you can try suggestions put together here: https://www.openshift.com/forums/openshift/methoddynamic-ip-for-your-apps-a-record

Sumana Mehta
  • 121
  • 1
  • 1
    Welcome to Server Fault! [SF] **is not a forum**. Please do not post Answers unless they *actually answer the Question*. See the [FAQ] for more details. This answer will be be removed if not improved. Thank you and welcome to [SF]! – Chris S Apr 04 '13 at 00:18
-1

I have found a solution!

See: http://wwwizer.com/naked-domain-redirect

The solution itself is creating A record pointing to the 174.129.25.170 (their server), that will HTTP 301-redirect you to the www.yourdomain.com (basing on the Host header, probably).

MInner
  • 109
  • 6
  • Welcome to Server Fault - We prefer answers that can stand alone in the event their links go dead (see http://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers) - Please consider updating your answer so that it will remain useful if the link goes dead. – voretaq7 Apr 04 '13 at 18:37
  • I've used wwwizer but it sets off paranoid bells for me for anything important. Handing half your visits off to a free third-party service... – ceejayoz Apr 04 '13 at 18:43
  • @ceejayoz, I agree. But, in this case, it is the only working solution I found. (Excepting, cron script that updates your A record on free dns service from time to time - that's really "unsafe" (some users may visit your domain while it's A information is not up-to-date) ). There're lots of such questions on OpehShift forums, but the only thing, they say is "yes, we don't have static IP addresses and that's a pity". – MInner Apr 04 '13 at 19:27