I am trying to set up DNS forwarding on CloudFlare, to my Openshift page (the-domain.rhcloud.com).
But when I go into the CloudFlare DNS settings and try to change t
If you want your domain name to start with https://www
, take a look at the steps bellow that worked for me.
Let's say we want to configure cloudflare and openshift for this domain name: example.org
.
I have two records set:
Type: CNAME Name: example.org Value: example-example.rhcloud.com (you should see CNAME flattening sign for this one)
Type: CNAME Name: www Value: example.org
Two rules:
http://www.example.org/* Settings: Always use HTTPS
example.org/* Settings: Forwarding url, 301 — Permanent redirect, https://www.example.org/$1
Add one alias:
It's a bit unusual, but when using services like Openshift/Heroku etc, there is no A record for the domain in your DNS. This is because there is no single A record corresponding to your site or app on the service.
If you've already set up the domain at your registrar using Cloudflare's nameservers (you need to do this!) there should be no need to do anything else at the registrar.
You need to set up one (or more) CNAMEs for the site/app at Cloudlare (if it's a website, you may want one each for e.g. example.com and www.example.com).
Assuming you do need the 'naked' domain and the www version, you'd do this:
the-domain
in the first fieldthe-domain.rhcloud.com
in the second ("is an alias of") fieldwww
for step 3.http://the-domain.com/*
to http://www.the-domain.com/$1
orhttp://www.the-domain.com/*
to http://the-domain.com/$1