The situation is as follows:

  • There is an application on openshift which is available on urlu MYAPP.rhcloud.com
  • There is a MYDOMAIN.com domain. I want the application to be available for this domain.

Current solution:
On an open-label in the instructions it is written to create a CNAME record with the provider.
But I can’t create a CNAME for the root of the domain. MYDOMAIN.com CNAME MYAPP.rhcloud.com

I can only SUBDOMAIN.MYDOMAIN.com CNAME MYAPP.rhcloud.com

But I want my application to be available both www.MYDOMAIN.com and MYDOMAIN.com
For www.MYDOMAIN.com you can create a CNAME. And for MYDOMAIN.com while I see only buy the cheapest hosting and redirect from MYDOMAIN.com to www.MYDOMAIN.com

Questions:
1. How bad is the solution?
2. Maybe someone knows Dns where you can make a CNAME on MYDOMAIN.com?

    1 answer 1

    Maybe someone knows Dns where you can make a CNAME on MYDOMAIN.com?

    According to RFC1912 :

    A CNAME record is not allowed to be coexist with any other data.
    (free translation: the cname record cannot coexist with any other data)

    in the case of a domain name delegated to you, such “coexisting data” will be a soa record, without which the delegation itself is impossible.


    but there is a (free) exit

    You can use some free redirector.

    for example: http://wwwizer.com/naked-domain-redirect

    for this, make an a- record for the root of your domain, leading to the ip- address of the "redirector":

     @ in a 174.129.25.170 

    after that, all http calls to your domain http://domen.vash will be redirected to http://www.domen.vash .

    and for the www subdomain, configure what is required ( cname , etc., etc.).


    demonstration of the performance of the said "redirector":

     $ curl -I -H 'host: domen.vash' 174.129.25.170 HTTP/1.1 301 Moved Permanently Server: nginx/1.8.0 Date: Fri, 25 Sep 2015 19:26:23 GMT Content-Type: text/html Content-Length: 184 Connection: keep-alive Location: http://www.domen.vash/ $ curl -I -H 'host: blabla.bla' 174.129.25.170 HTTP/1.1 301 Moved Permanently Server: nginx/1.8.0 Date: Fri, 25 Sep 2015 19:25:52 GMT Content-Type: text/html Content-Length: 184 Connection: keep-alive Location: http://www.blabla.bla/