1

I migrated my multisite wordpress website (www.example.com) to a subdomain (dev.example.com) to work on some big changes. Of course, I changed siteurl and home in the DB for all sites.

The problem is whenever I go to https://dev.example.com I get redirected to a non existing https://www.dev.example.com

I can't figure out where this www is coming from (and it is not .htaccess). This is driving me nuts. After hours of google, I finally decided to reach out for help.

Thanks!

2
  • 1
    Remember that redirects are cached by the browser. Making changes to things to try to solve a redirect problem without also restarting the browser completely from time to time is an exercise in endless frustration. ;)
    – Otto
    Aug 2, 2014 at 16:53
  • 1
    Thanks @Otto, I have done that in the past. Hours wasted because I forgot to clear the browser cache!
    – Nate
    Aug 3, 2014 at 20:00

2 Answers 2

1

Did you check your ISP's setting? E.g. in Dreamhost's control panel you have these 3 options:

Do you want the www in your URL?

  • Leave it alone: Both http://www.domain.com/ and http://domain.com/ will work.
  • Add WWW: Make http://domain.com/ redirect to http://www.domain.com/
  • Remove WWW: Make http://www.domain.com/ redirect to http://domain.com/
4
  • Thanks @break68, I use a provider with cPanel. I'll see if there is something there.
    – Nate
    Aug 2, 2014 at 16:31
  • I found a "redirect" option in cPanel. I guess it reads directly from .htaccess, so I don't think that is going to help. I am just not sure where this redirect is coming from. It has to be wordpress since I don't have any redirect in .htaccess that could be doing this.
    – Nate
    Aug 2, 2014 at 16:37
  • @nhadsall don't rush to blame WP. Simple to check – if you disable WP (die() in config file for example), does redirect still happen?
    – Rarst
    Aug 2, 2014 at 22:38
  • @Rarst, thanks for the tip. You were right: it isn't WP. Not sure what the problem is then. I'll see if there is some strange cPanel config I am missing. Thanks!
    – Nate
    Aug 2, 2014 at 23:45
1

In case anyone has a similar problem the answer was a lot more complicated than I thought. It turns out that NameCheap (my hosting company) installed a different SSL cert incorrectly. It was causing a redirect to another site, which applied it's .htaccess rules, adding the "www".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.