How to Fix Redirection Plugin Changing HTTP to HTTPS Automatically
Content
If you've ever tried to create a redirect from an old HTTP URL only to find the Redirection plugin automatically changes it to HTTPS, you're not alone. This is a common point of confusion that can prevent your redirects from working as intended. This guide will explain why this happens and show you the correct way to set up these types of redirects.
Why Does This Happen?
By default, the Redirection plugin operates within the context of your current WordPress installation. If your site is currently running on HTTPS (which most modern sites are), the plugin will often assume that any URL you enter for a source or target should also use HTTPS. This behavior is designed to maintain consistency and security on your primary domain.
The issue arises when you need to redirect from an old URL that used a different protocol (HTTP) or a completely different domain. The plugin's automatic correction, while helpful in most cases, can break these specific redirects.
The Solution: Use the "URL and Server" Match Type
The key to successfully redirecting from an HTTP URL or a different domain is to change the Match setting for your redirect rule. Instead of using the default "URL only" match, you need to select "URL and server".
Here’s how to do it:
- In your WordPress admin, go to Tools → Redirection.
- Click Add New to create a redirect.
- In the Source URL field, enter the old path (e.g.,
/index/offer/). - In the Match dropdown, select "URL and server".
- A new Server field will appear. In this field, enter the exact domain and protocol of the old URL you want to match (e.g.,
http://mydomain.com). - In the Target URL field, enter the full destination URL (e.g.,
https://www.mydomain.com). - Choose your desired redirect type (e.g., 301) and click Add Redirect.
This configuration tells the plugin to specifically look for requests coming to http://mydomain.com/index/offer/ and redirect them to your new target, preventing any automatic protocol changes from interfering.
Important Considerations
- Bulk Changes: If you have a large number of redirects that were incorrectly changed (as seen in one user's case with 900+ redirects), the most efficient method is to export your redirects to a CSV file, use a spreadsheet editor to do a bulk find-and-replace (changing
http://tohttps://in the target URLs), delete the old rules, and then re-import the corrected CSV file. - Regex Escaping: If your source URLs contain special characters like
?(common in query parameters), you may need to escape them with a backslash (?) in your regex patterns for the redirect to work correctly.
By understanding the "URL and server" match option, you can take full control over your redirects and ensure they work correctly, even when dealing with different protocols or domains.
Related Support Threads Support
-
How do I do this?https://wordpress.org/support/topic/how-do-i-do-this-17/
-
Redirection change HTTP with HTTPShttps://wordpress.org/support/topic/redirection-change-http-with-https/
-
Rewrite and keep original urlhttps://wordpress.org/support/topic/rewrite-and-keep-original-url/
-
Redirection issuehttps://wordpress.org/support/topic/redirection-issue-39/
-
redirect on a 403https://wordpress.org/support/topic/redirect-on-a-403/
-
losing relative urlhttps://wordpress.org/support/topic/losing-relative-url/
-
bypass redirectionhttps://wordpress.org/support/topic/bypass-redirection/
-
redir from http to httpshttps://wordpress.org/support/topic/redir-from-http-to-https/
-
Old site with “retina” jpgshttps://wordpress.org/support/topic/old-site-with-retina-jpgs/
-
https to http redirecthttps://wordpress.org/support/topic/https-to-http-redirect-3/
-
Site wide redirection is 301?https://wordpress.org/support/topic/site-wide-redirection-is-301/
-
Add missing path to the targethttps://wordpress.org/support/topic/add-missing-path-to-the-target/
-
Redirect all languages /es/etc + /en/etc > samehttps://wordpress.org/support/topic/redirect-all-languages-es-etc-en-etc-same/
-
redirection to version with trailing slashhttps://wordpress.org/support/topic/redirection-to-version-with-trailing-slash/
-
Wildcard Custom Redirect for Translatepresshttps://wordpress.org/support/topic/wildcard-custom-redirect-with/
-
Rewriting Rule for redirecting start page onlyhttps://wordpress.org/support/topic/rewriting-rule-for-redirecting-start-page-only/
-
Redirect underscores to dashes…https://wordpress.org/support/topic/redirect-underscores-to-dashes/
-
Redirect partial urlhttps://wordpress.org/support/topic/redirect-partial-url/
-
Redirecting base url to external sitehttps://wordpress.org/support/topic/redirecting-base-url-to-external-site/
-
redirect 404https://wordpress.org/support/topic/redirect-404-4/
-
changing my WordPress domainhttps://wordpress.org/support/topic/change-my-wordpress-domain/
-
redirecting a folder or directoryhttps://wordpress.org/support/topic/redirecting-a-folder-or-directory/
-
Case insensitive URL permutations all served as 200 instead canonical redirecthttps://wordpress.org/support/topic/case-insensitive-url-permutations-all-served-as-200-instead-canonical-redirect/
-
Redirect not successhttps://wordpress.org/support/topic/redirect-not-success/
-
IP To Domainhttps://wordpress.org/support/topic/ip-to-domain/
-
Redirect after the slashhttps://wordpress.org/support/topic/redirect-after-the-slash/
-
Redirect all pages to ONE urlhttps://wordpress.org/support/topic/redirect-all-pages-to-one-url/
-
301 redirects for full websitehttps://wordpress.org/support/topic/301-redirects-for-full-website/
-
Redirect Image Filename Changeshttps://wordpress.org/support/topic/redirect-image-filename-changes/
-
How to pass string in URL as parameter to new URLhttps://wordpress.org/support/topic/how-to-pass-string-in-url-as-parameter-to-new-url/
-
URL Path redirect?https://wordpress.org/support/topic/url-path-redirect/
-
Some help with redirecthttps://wordpress.org/support/topic/some-help-with-redirect/
-
use along with .htaccess?https://wordpress.org/support/topic/use-algon-with-htaccess/
-
redirectionhttps://wordpress.org/support/topic/redirection-73/
-
Redirect 301 URL uppercase to lowercasehttps://wordpress.org/support/topic/redirect-301-url-uppercase-to-lowercase/
-
Using Pass through but canonical url not updatedhttps://wordpress.org/support/topic/using-pass-through-but-canonical-url-not-updated/
-
How To Redirect a Subfolder to a Subdomainhttps://wordpress.org/support/topic/how-to-redirect-a-subfolder-to-a-subdomain/
-
WPML and lang folderhttps://wordpress.org/support/topic/wpml-and-lang-folder/
-
import rank math redirectionshttps://wordpress.org/support/topic/import-rank-math-redirections/
-
doesn’t work with multiple 20%https://wordpress.org/support/topic/doesnt-work-with-multiple-20/
-
Can’t redirect subdomain into another domainhttps://wordpress.org/support/topic/cant-redirect-subdomain-into-another-domain/
-
Redirect using expressionshttps://wordpress.org/support/topic/redirect-using-expressions/
-
Cancel/Remove Redirect 301https://wordpress.org/support/topic/cancel-remove-redirect-301/
-
Bulk ID replace in redirectionhttps://wordpress.org/support/topic/bulk-id-replace-in-redirection/
-
/go/ subfolder?https://wordpress.org/support/topic/go-subfolder/
-
I need help to bulk redirect amp urlhttps://wordpress.org/support/topic/i-need-help-to-bulk-redirect-amp-url/
-
Create redirects that must exclude a part of the urlhttps://wordpress.org/support/topic/create-redirects-that-must-exclude-a-part-of-the-url/
-
Use the plugin for multiple domainshttps://wordpress.org/support/topic/use-the-plugin-for-multiple-domains/
-
Redirect and keep original urlhttps://wordpress.org/support/topic/redirect-and-keep-original-url/
-
Redirect /123/ but not /test/123/https://wordpress.org/support/topic/redirect-123-but-not-test-123/
-
help site Redirectionhttps://wordpress.org/support/topic/help-site-redirection/
-
How to redirection links from being cached?https://wordpress.org/support/topic/how-to-redirection-links-from-being-cached/
-
?utm_source redirection to parent posthttps://wordpress.org/support/topic/utm_source-redirection-to-parent-post/
-
redirecting a third party callhttps://wordpress.org/support/topic/redirecting-a-third-party-call/
-
Add IP in Dynamic URLs?https://wordpress.org/support/topic/add-ip-in-dynamic-urls/
-
Redirecting unique urlshttps://wordpress.org/support/topic/redirecting-unique-urls/
-
Secondary and Tertiary domains mapped to their own pageshttps://wordpress.org/support/topic/secondary-and-tertiary-domains-mapped-to-their-own-pages/
-
Redirections target url all switched to http:// from https:// after site migratehttps://wordpress.org/support/topic/redirections-target-url-all-switched-to-http-from-https-after-site-migrate/
-
1000 Posts redirectionhttps://wordpress.org/support/topic/1000-posts-redirection/
-
Does URL+server redirect both http and https?https://wordpress.org/support/topic/does-urlserver-redirect-both-http-and-https/
-
Redirect ajax URLhttps://wordpress.org/support/topic/redirect-ajax-url/
-
Redirect homepage to external site?https://wordpress.org/support/topic/redirect-homepage-to-external-site/
-
Subdomain redirectionhttps://wordpress.org/support/topic/subdomain-redirection-3/
-
Rewriting external links to protect digital downloads.https://wordpress.org/support/topic/rewriting-external-links-to-protect-digital-downloads/
-
.htaccess and nginx rules I want to implementhttps://wordpress.org/support/topic/htaccess-and-nginx-rules-i-want-to-implement/
-
re-direct all full path of sub-sitehttps://wordpress.org/support/topic/re-direct-all-full-path-of-sub-site/
-
Can Redirection plugin also achieve to serve media filenames case insensitive?https://wordpress.org/support/topic/can-redirection-plugin-also-achieve-to-serve-media-filenames-case-insensitive/
-
Redirect TLD to www.TLDhttps://wordpress.org/support/topic/redirect-tld-to-www-tld/