• Resolved HaraldC

    (@haraldc)


    Hello

    (this was tested on a local install after seeing it on my live site)

    After migrating to SSL I see that the old non-ssl site is automatically redirected with a 301 to the SSl site without me doing anything special.

    To put it in other words let say I’ve set up a mysite.local
    the change the Site and WordPress address to https://mysite.local

    Now when going to https://mysite.local I end up automatically on https://mysite.local

    What’s more, when I run:
    curl -I https://mysite.local
    I see:
    HTTP/1.1 301 Moved Permanently

    This must have been put automatically by WordPress, since I haven’t done anything explicit.

    Is this something new? (because I see plugins doing redirects …)

    Thank you for your attention.

    Regards,
    Harald

Viewing 5 replies - 1 through 5 (of 5 total)
  • Have you checked your htaccess file for any 301 redirects?

    Thread Starter HaraldC

    (@haraldc)

    yes, searched from left to right, from right to left, from top to bottom, in reverse ?? … couldn’t find anything :((((

    Could you please provide a list of what plugins you’re using?

    Thread Starter HaraldC

    (@haraldc)

    OK, I think I found the culprit.

    Here’s the full story:

    WordPress have a ‘redirect_canonical’ function. A plugin can hook into it with an ‘add-filter’

    The global redirection was done by Yoast free SEO plugin by adding a filter (found by doing some grepping around).

    I don’t know how the redirection got activated and I’ve not seen a deactivation option.

    Disabling the plugin will NOT remove the redirect.

    So what I did was to export settings, uninstall Yoast then reinstall and import settings.

    Seems to have fixed the problem.

    So I’m marking this as resolved.

    That was actually my hunch… which was why I asked for a list of you plugins because I have seen this before.

    Glad you resolved the issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Automatic 301 redirect?’ is closed to new replies.