Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
CNAME records can not be on the SOA for a domain, so @ cannot be a CNAME. –  Wesley Apr 2 '13 at 19:34
    
(or rather should not be. I have heard of some allowances for that.) –  Wesley Apr 2 '13 at 19:41

3 Answers 3

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).

share|improve this answer
    
Welcome to Server Fault - We prefer answers that can stand alone in the event their links go dead (see meta.stackexchange.com/questions/8231/…) - Please consider updating your answer so that it will remain useful if the link goes dead. –  voretaq7 Apr 4 '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 4 '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 4 '13 at 19:27

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

share|improve this answer
1  
Welcome to Server Fault! Server Fault 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 Server Fault! –  Chris S Apr 4 '13 at 0:18

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".

share|improve this answer
    
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 2 '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 3 '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 4 '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 4 '13 at 19:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.