How to use naked GoDaddy domain with OpenShift hosting? [closed]

坚强是说给别人听的谎言 提交于 2019-11-28 15:31:55

Solution

01) Sign up to cloudflare
02) Set these cname rules:

mydomain.com > appname-username.rhcloud.com (this will utilise 'cname flattening')

www > mydomain.com

03) Set page rules:

http://www.mydomain.com/* > http://mydomain.com/$1

04) Set alias in OpenShift to mydomain.com

05) Make sure GoDaddy DNS record doesn't have any conflicting cname or A record set up.

06) Let it simmer overnight and all of the original desired behaviour should be working.

Here is what worked for me.

Domain name : example.com
openshift app: myapp-mydomain.rhcloud.com

--on godaddy
      Domains>All Domains>select your domain example.com>click DNS ZONE FILE tab
      1. delete www CNAME
      2. create new Record with 
         Record Type CNAME > HOST: www > POINT TO: myapp-mydomain.rhcloud.com
      3. click Finish 

      Click Settings tab
      1. Forwarding > click Manage
         Forward to:www.example.com > Redirect: 301 (Permanent) > Type: Forward only
      2. click ADD

--on Openshift
      1. select Application tab > select application myapp-mydomain.rhcloud.com        
         > click change
      2. enter Domain name www.example.com

That's it. Wait for 10-15 min and see the magic.

To get your domain (with 'www' and without), to successfully point to your OpenShift alias, without 'masking' or 'forwarding' see this tutorial I wrote:

It works with CNAME Flattening.

@Azghanvi: I faced the same problem. Make sure you add "www.example.com" as your alias in openshift and not "example.com". Seems like Godaddy does not support "example.com" by default.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!