Custom domains and naked domains with openshift apps

on Note Written by Sirwan Qutbi.

A tutorial on how to get openshift app domains to work with and without .www. As part of this example, this tutorial will use the openshift domain name world and the app name hello.

Add domain alias to openshift

Navigate to your application in the web console, and add 2 aliases to your domain. Add one with a www then add another without. So you should have 2 aliases to your app's domain. i.e and

Sign up to CloudFlare

Sign up at and add your domain as

Configure CloudFlare

Now we need to configure CloudFlare so it just works. Go to your DNS settings in CloudFlare. Remove all the default rules added by CloudFlare.

Now add the following rules for your respective domain to your CloudFlare DNS records.

  • type: CNAME. name: *. value:
  • type: CNAME. name: value:
  • type: CNAME. name: www. value:

Leave all the TTL column set as Automatic.

If your stuck dont hesitate to email me at [email protected]