Support » Fixing WordPress » Aliased domains being redirected (by wordpress?)

  • Hi,

    I’m trying to figure out if a problem is wordpress, or my hosting provider.

    Previously, I was using WordPress 4.3.5 (I think), and it’s been stable for ages. A big part about the way I used it, is that I had my primary domain, eg and my secondary domain eg aliased to the primary one.

    My WordPress install lived in and I had the standard technique of putting the tiny index.php in the root folder to let the site look as if it was installed in root.

    The way it has always worked, and worked well, is that if a person went to, they would get my website, but everything about it would behave as if it were the one and only domain for that site. Clicking on all the nav items, links between posts etc, the address in the browser would stay as starting with

    Since upgrading to 4.5.3 whenever I go to my site using, the browser immediately redirects to – the address has always been in WordPress’ settings as the site address – but it’s never seemed to be an issue previously.

    This doesn’t happen with static html pages that aren’t a part of wordpress, and if I put in the address of a Page in the wordpress site eg, it doesn’t redirect, but all the links generated by wordpress are being output as links to

    Am I seeing a change in the behaviour of wordpress that’s been introduced since 4.3.5, or could this be a problem within the realm of a theme to cause, or am I perhaps seeing this as a symptom of something going wrong at my host?

Viewing 1 replies (of 1 total)
  • Well, for what it’s worth, I still don’t know WHY this is happening, but I solved the problem.

    First, add:

    remove_filter('template_redirect', 'redirect_canonical');

    To my theme’s functions.php file

    Second, install the Relative URL plugin to ensure all site links have the adsolute path removed, and I’m now back to a website hat I can give either by business domain, and people browse it seeing all business name urls / page titles, or my personal domain, and likewise.

    It would still be nice to know what’s happening. It could be that I did this non-canonical change in a core file ages ago and forgot about it, not sure though why the links starting behaving as if they were absolute paths though.

Viewing 1 replies (of 1 total)
  • The topic ‘Aliased domains being redirected (by wordpress?)’ is closed to new replies.