[wp-trac] [WordPress Trac] #63163: WordPress always redirecting secondary domains to main domain set in General settings
WordPress Trac
noreply at wordpress.org
Tue Mar 25 12:50:57 UTC 2025
#63163: WordPress always redirecting secondary domains to main domain set in
General settings
---------------------------+-----------------------------
Reporter: josvlaar | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version: 6.7.2
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
My WordPress installs have, for some reason, started redirecting secondary
domains to the main domain set in General settings. Before, this was only
happening when trying to login on the secondary domains. You can view this
behaviour at test.itwithme.ca, which redirects to test.itwithme.com. I
know WordPress is causing this redirect because when I change the domain
set as primary domain in General settings, the redirect also changes to
redirect to this domain (so .com would start redirecting to .ca instead of
the other way around). Also, my .htaccess files don't contain such a
redirect, nor do my Apache sites-available config files. The only plugins
I have installed are: all in one wp migration, litespeed cache, wordfence
security, wp control. I also have Astra installed as the only theme.
I think a redirect like this should never happen, not even when users are
logging in. Because I want to serve different content based on the URL
users are accessing the site from. This doesn't work (is impossible to do)
with a redirect like this. Also it would be nice if users stayed on the
same domain when logging in, so that their content doesn't change when
logging in.
I hope you can reproduce my error and fix it. Let me know if you need any
more information!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63163>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list