How do I add an alias for a naked domain with OpenShift?

openshift, openshift-client-tools, ssh

Solution

It's a two-step process:

- First, make sure that you have a DNS provider that offers support for naked `CNAMES`, then and add one or more `CNAME` entries that point to the URL that OpenShift provided for your application (APPNAME-NAMESPACE.rhcloud.com or similar).

- Next, use the `rhc alias` command to let OpenShift know that you would like your application to be made available whenever a request is received via any of the `CNAME`s configured in your DNS. This step can also be completed on the Web via your OpenShift app management dashboard.

For example, if you had an OpenShift application named `wordpress` that you wanted available at `wordup.com`, your `rhc alias` command might look like this:

rhc alias add wordpress wordup.com

I wrote up a post to help answer this question here: https://www.openshift.com/blogs/domain-names-and-ssl-in-the-openshift-web-console

Problem

How can I make my naked domain to point to my Openshift application? Can it be done in the Openshift online dashboard or it can only be configured through the `rhc` utility? However I am not sure which the steps to do it.

Original source

Related problems