0

I installed a Wordpress site on an OpenShift Online [PAAS] account.

  1. If I configure Wordpress Address & Site Address (in General Settings) both to http:// example.com (without the space; I added the space here to not be prevented from posting with an http link), then requesting that URL returns "Too Many Redirects" error (I think that's a 310 error). Same for www.example.com
  2. If I configure them to http:// www.example.com (again no space), with the www., then all Wordpress pages load... they load for both example.com & www.example.com requests

Why does 1. happen, and force me to do 2.? From lots of online resources, it looks like 1. should work?

Related details:

  1. The default url for my Wordpress upon installation is app-user.rhcloud.com (that is the default value for both Wordpress Address & Site Address before I updated them to my custom domain). Before updating those, requests to that url load all pages
  2. Along with updating Wordpress Address & Site Address, I correspondingly added an alias on the OpenShift app for www.example.com -> app-user.rhcloud.com. (Nothing different if I also alias example.com -> app-user.rhclud.com)
  3. I have example.com registered with namesilo.com. They redirect requests from example.com to www.example.com
  4. I have a CNAME record mapping www.example.com to my OpenShift's app-user.rhcloud.com (which OpenShift instructs for custom domains) where my Wordpress is hosted

I would think 1. should have been facilitated sufficiently by 4. - 6. ?

Thanks!

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
cellepo
  • 125
  • 8
  • You have to use www when using a PaaS provider such as OpenShift or Heroku, because naked domains can't have a CNAME. – Michael Hampton Sep 21 '15 at 23:47
  • @MichaelHampton didn't I account for that with my points 5. and 6.? My domain registrar re-directs mydomain.com to www.mydomain.com, and I have a CNAME for www.mydomain.com to my OpenShift app-user.rhcloud.com. Just trying to make sure I understand you. thanks. – cellepo Sep 22 '15 at 00:02
  • And also like I was saying, from lots of online resources (like 3B in http://code.tutsplus.com/tutorials/running-wordpress-on-openshift-an-introduction--cms-20058), it looks like other people somehow got 1. to work. I'm thinking there must be some subtle difference in my case that I'm not aware of yet. – cellepo Sep 22 '15 at 00:04

1 Answers1

1

Openshift uses a CNAME to route your traffic to the correct host, although some NameServer hosts may permit CNAME for the root domain, this is not RFC Compliant. since a CNAME includes all types of records, not just A (MX, TXT, and NS!)

Jacob Evans
  • 7,886
  • 3
  • 29
  • 57
  • 1
    Link created, it's for changing URLs in WordPress – Jacob Evans Sep 22 '15 at 00:07
  • I will look into your suggestions, thanks. In the meantime, can you tell me more about "never use the naked domain"? Sounds like something useful for me to still learn :) – cellepo Sep 22 '15 at 00:24
  • www.example.com pings to the same IP as app-user.rhcloud.com (expected). But example.com pings to the namesilo (domain registrar) parking server that then does the redirecting to www.example.com (not sure if that's expected, but seems plausible given the redirect). – cellepo Sep 22 '15 at 00:28
  • 1
    http://www.yes-www.org/why-use-www/ – Jacob Evans Sep 22 '15 at 00:28
  • Thanks for that link. It convinced me that my current situation (2. from this original question) that has www.example.com with the www. is actually preferable anyways. So its not worth it for me to troubleshoot otherwise further; but I will re-visit your other suggestions if I need to get to the bottom of it for some other reason in the future. – cellepo Sep 23 '15 at 19:10
  • 1
    Glad I could help, mind marked it answered? – Jacob Evans Sep 25 '15 at 03:24