• I am badly confused about redirection for three of my websites, and I’m not even sure that WordPress is the right place to post my question. If there is a better place, please let me know!

    Background

    I have three WordPress websites. Two of them start with www and one doesn’t. Let’s call them:
    https://example-a.com
    https://www.example-b.com
    https://www.example-c.com

    The three websites are pretty much similar in structure, and I haven’t done any non-standard customisations — just installing themes and plugins, and customising via the WordPress back-end.

    Apache redirects

    • HTTPS is enforced via each site’s .htaccess file.
    • WordPress Settings > General > WordPress URL and Site Address URL are all correctly set to the URLs given above (including https://, and www. for the second two sites).
    • The first site’s .htaccess file removes www. if the user has entered it.
    • The second two sites’ .htacces files add www. if they aren’t subdomains (so it adds www. to example-b.com but not to /test.example-b.com).
    • The .htaccess files for the second two sites are identical. I have checked this by running diff against them.

    Expected and unexpected redirects

    When I enter a subdomain — let’s say mail.example-b.com — I get inconsistent results. Specifically, the first and third work correctly, but the second doesn’t, as follows.

    • <mail.example-a.com I expect this to not redirect, and it correctly doesn’t redirect.
    • mail.example-b.com I expect this to not redirect, but it redirects to https://www.example-b.com. I don’t know what is causing the redirect.
    • mail.example-c.com I expect this to not redirect, and it correctly doesn’t redirect.

    So, the second two are inconsistent.

    So…

    What could be causing mail.example-b.com to redirect, but mail.example-c.com to not redirect? I have no idea where else to look!

    Thanks for reading!

    • This topic was modified 6 years, 8 months ago by Paddy Landau. Reason: Fixed spelling
    • This topic was modified 6 years, 8 months ago by Paddy Landau. Reason: Consistency
    • This topic was modified 6 years, 8 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I’m not even sure that WordPress is the right place to post my question

    As I don’t see a WordPress topic here, it really isn’t. Have you considered asking your host provider for support?

    Thread Starter Paddy Landau

    (@paddy-landau)

    Thanks for the reply, Jan. As the Apache redirects are identical, I was wondering if something in WordPress was redirecting, maybe a setting of which I am unaware?

    • This reply was modified 6 years, 8 months ago by Paddy Landau.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Inconsistent redirection confusion’ is closed to new replies.