As stated before I dig the Cloud Application Platform (PaaS) by Red Hat a lot. Same goes for Heroku but they all have a common disavantage: you can’t assign an IP address to your cart(s). That might let you run into issues when you need to configure DNS and MX records.
On the OpenShift website you can read how to configure your DNS to use OpenShift but in my case, after adding a CNAME-record on my rootdomain techswag.nl my MX records stopped being valid. That’s a normal thing, because after you change your rootdomain MX records can’t be validated anymore. But I don’t want to have a subdomain, so what now?
This is NOT going to work:
Tried a lot of possible ways to get this working, even with some help from OpenShift it was still kind of difficult because it depends on what your DNS provider allows you to change. Do they have a redirecting feature? Can you add CNAME records?
Just delete all the unnecessary entries and make a CNAME record that redirects the www.domain.xxx to the OpenShift cartridge. And now redirect all the trafic from *.domain.xxx to http://www.domain.xxx (but note that not all the DNS providers allow this):