openshift


How to use naked GoDaddy domain with OpenShift hosting? [closed]


Desired Behaviour
I have a GoDaddy domain name and am using OpenShift for hosting.
I would like the following to be true:
a) user enters www.mysitename.com > user sees mysitename.com
b) user enters www.mysitename.com/about.html > user sees mysitename.com/about.html
c) user enters mysitename.com or mysitename.com/about.html and they also see that url.
d) to summarise, the www prefix is never displayed anywhere on the site.
Constraints
OpenShift hosting does not have a static IP, so it is not possible to adjust the A record at GoDaddy.
The format for the OpenShift app is http://appname-username.rhcloud.com.
You can set up a cname at GoDaddy with the following:
www > appname-username.rhcloud.com
This means the site is accessible at www.mydomain.com but not at mydomain.com.
Suggested Solutions
There are several posts on the topic that suggest the following but for several reasons are not adequate solutions:
use a subdomain ie blog.mydomain.com
use wwwizer
use forwarding and masking (causes the url to stay the same when navigating relative links)
Question
Can anyone think of another solution that satisfies the desired behaviour stated above?
Or do I need to change to a registrar that allows "naked cname records"?
Related Posts
http://stackoverflow.com/questions/18431034/godaddy-domain-pointing-to-openshift-hosting
Naked domain with Openshift
How do I add an alias for a naked domain with OpenShift?
Edit
This blog posts sums up the scenario:
http://blog.cloudflare.com/zone-apex-naked-domain-root-domain-cname-supp
Could I sign up for CloudFlare to resolve the issue?
I haven't used it before and don't know how it works.
Solution
01) Sign up to cloudflare
02) Set these cname rules:
mydomain.com > appname-username.rhcloud.com (this will utilise 'cname flattening')
www > mydomain.com
03) Set page rules:
http://www.mydomain.com/* > http://mydomain.com/$1
04) Set alias in OpenShift to mydomain.com
05) Make sure GoDaddy DNS record doesn't have any conflicting cname or A record set up.
06) Let it simmer overnight and all of the original desired behaviour should be working.
Here is what worked for me.
Domain name : example.com
openshift app: myapp-mydomain.rhcloud.com
--on godaddy
Domains>All Domains>select your domain example.com>click DNS ZONE FILE tab
1. delete www CNAME
2. create new Record with
Record Type CNAME > HOST: www > POINT TO: myapp-mydomain.rhcloud.com
3. click Finish
Click Settings tab
1. Forwarding > click Manage
Forward to:www.example.com > Redirect: 301 (Permanent) > Type: Forward only
2. click ADD
--on Openshift
1. select Application tab > select application myapp-mydomain.rhcloud.com
> click change
2. enter Domain name www.example.com
That's it. Wait for 10-15 min and see the magic.
To get your domain (with 'www' and without), to successfully point to your OpenShift alias, without 'masking' or 'forwarding' see this tutorial I wrote:
How to get a custom domain and naked domains work for your OpenShift application
It works with CNAME Flattening.
#Azghanvi: I faced the same problem.
Make sure you add "www.example.com" as your alias in openshift and not "example.com".
Seems like Godaddy does not support "example.com" by default.

Related Links

set-env PATH in Openshift
Updating NPM on OpenShift
How to pass variable when adding a cartridge?
OpenShift Online: Change gear size of existing scaled application
Why do OpenShift action hook scripts fail with strange errors?
Xorg on OpenShift
Putting private information on Public PaaS?
OPENSHIFT - 'wsgi.py' does not contain WSGI application 'application'
How do I install pdftk on Openshift?
Openshift hooks during gear restart
Openshift - Unable to set the env in JBoss as7 cartridges
How can I make a custom 503 page on OpenShift?
Openshift: Cron job fails to run
OpenShift Enterprise creating directories in root file system
Restoring a dokuwki to openshift
gear size of more than one CPU / core in OpenShift Enterprise 2?

Categories

HOME
matrix
barcode-scanner
google-play-services
gallery
lvm
amp
implicit-conversion
visualforce
azure-mobile-services
impala
cdi
hystrix
lc3
slide
phpstorm-2017.1
jpa-2.0
xsl-fo
node-webkit
workday
cell
high-availability
window-managers
background-color
basex
math.js
sales
javax.persistence
matlab-app-designer
series
jfxtras
subclassing
nsuserdefaults
cordys-opentext
code-rally
assemblies
get-event-store
data-uri
word-cloud
fluid-mac-app-engine
httphandler
vesta
bit-shift
cyanogenmod
return-type
aws-kinesis-firehose
tinyioc
image-registration
android-5.0-lollipop
brightscript
predicates
word-2016
prefetch
email-injection
xcode6.4
mathjs
data-management
carmen
callouts
coovachilli
perforce-integrate
noclassdeffounderror
maximize
gwt-syncproxy
taco
voronoi
nette
360-degrees
componentart
com0com
clarion
android-audiomanager
findersync
fiware-bosun
pass-by-value
google-hangouts
operands
dos2unix
thoughtworks-go
cout
jquery-mobile-flipswitch
lmax
accessory
mfmessagecomposeview
xmi
yii-booster
disjoint-union
acceptance-testing
cmath
2d-vector
popup-blocker
server-name
algol68
yuidoc
will-paginate
radscheduler
qcar-sdk
regression-testing
gaelyk
downgrade
aptitude
dm
firephp
data-retrieval
gtktextview
iphone-sdk-3.1.3
levels
rootkit

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App