How to use wildcard domain with OpenShift hosting?

If you have a domain name and want to use OpenShift for hosting then using wildcard domain name is bit tricky with some domain registrars like GoDaddy. The reason is IP address of app on OpenShift doesn’t remain same and to use wildcard domain a DNS A record is setup with the IP address of hosting server. So, how do we make sure following to be true:

That is, the www prefix is always displayed anywhere on the site.

But due to the non-static IP of OpenShift app it is not possible to adjust the A record. But you can set up a cname with the following:

www >

where the format for the OpenShift app is

This means the site is accessible at but not at To make it work you need to do the following.

On domain registrar like GoDaddy
– Create new Record with
Record Type CNAME
HOST: www

On Openshift
1. Select Application tab > select application > click change
2. Enter Domain name

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


Ask J

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s