Too Many Redirects After Moving WordPress to HTTPS

DIRECT ANSWER
A WordPress “too many redirects” error after moving to HTTPS usually means WordPress, the web server, a security plugin, or a reverse proxy disagrees about whether the request is secure. Confirm both WordPress URL settings use HTTPS, configure trusted proxy detection when applicable, and keep only one deliberate HTTP-to-HTTPS redirect. Clear relevant caches and inspect the redirect chain after each controlled change.
Key takeaways
- Set both WordPress Address (URL) and Site Address (URL) to the same final HTTPS origin.
- If a CDN or reverse proxy terminates TLS, verify that the origin receives accurate forwarded-protocol information.
- Avoid overlapping HTTPS enforcement in plugins,
wp-config.php,.htaccess, Nginx, hosting controls, and proxy rules. - Hardcoded
http://content usually causes mixed-content warnings rather than the redirect loop itself. - Purge browser, WordPress, hosting, and CDN caches after correcting the configuration.
Site Administrator
What this error means & how to recognize it
- The site worked over HTTP before the HTTPS migration, then began showing “too many redirects.”
- The browser repeatedly switches between HTTP and HTTPS or requests the same HTTPS address repeatedly.
- The whole site may fail, or only
/wp-admin, the login page, or selected paths may loop. - Opening the HTTP address may produce one expected HTTPS redirect followed by repeated redirects instead of a normal response.
- Private browsing or another device may behave differently because of cached redirects, cookies, or site data.
Root causes, ordered by likelihood
- WordPress URL settings still use HTTP. If either WordPress Address (URL) or Site Address (URL) remains HTTP while another layer requires HTTPS, WordPress can redirect to a scheme that conflicts with the server’s policy.
- HTTPS enforcement exists in multiple layers. A security plugin,
wp-config.phplogic,.htaccessor Nginx rule, hosting setting, and proxy rule may overlap or make different assumptions about the request scheme. - A CDN or reverse proxy terminates TLS. The visitor connects over HTTPS while the origin connection is HTTP. If the original protocol is missing, incorrect, or not safely trusted, WordPress may repeatedly believe the request is insecure.
- A plugin or theme redirects a specific path. Login, admin, canonical-URL, security, and membership plugins can affect only
/wp-login.php,/wp-admin, or selected pages. - A stale cached redirect or browser cookie masks the correction. This is less likely to be the original cause, but it can make a fixed configuration appear broken.
- Old HTTP references remain in content or configuration. These normally cause mixed-content warnings or an additional redirect, not a site-wide redirect loop; investigate them after the main chain is fixed.
How to fix it
1. Inspect the redirect chain
Use a private browsing window for an initial check. If you have shell access, set a shell variable to the affected site’s actual HTTPS address and run this read-only request:
SITE_URL='the actual HTTPS site address'
curl -IL "$SITE_URL"Record every status code and Location: header. Alternating HTTP and HTTPS usually indicates a scheme-detection or redirect-rule conflict. Repeating the same HTTPS address points more toward a canonical, plugin, proxy, or cached redirect. Do not include credentials, cookies, or authorization headers.
2. Check both WordPress URL settings
If the dashboard is available, open Settings → General and verify that WordPress Address (URL) and Site Address (URL) use the same intended HTTPS origin, including any required subdirectory.
If the loop blocks the dashboard, an authorized administrator with SFTP or database access can temporarily define the values in wp-config.php:
define( 'WP_HOME', 'the actual canonical HTTPS address' );
define( 'WP_SITEURL', 'the actual canonical HTTPS address' );Back up the file first and make one controlled change. These constants override the corresponding dashboard fields while they are defined, so remove or manage them deliberately after testing.
3. Determine where TLS terminates
Establish whether the browser connects directly to the web server or through a CDN, load balancer, or reverse proxy. When a proxy terminates TLS, the origin may receive an HTTP connection even though the visitor used HTTPS.
Ask the hosting or proxy administrator to confirm that the original protocol is forwarded consistently and that WordPress is configured to recognize it only from the intended trusted proxy. Do not blindly trust X-Forwarded-Proto from arbitrary clients; an unvalidated forwarded header can create security problems.
4. Reduce HTTPS enforcement to one deliberate layer
List every place that may redirect HTTP to HTTPS:
- CDN or load-balancer rules
- Hosting-panel SSL settings
- Apache
.htaccessor Nginx configuration - Security or SSL plugins
- Custom
wp-config.phpor theme code
Keep enforcement at the layer that fits the hosting architecture, commonly the edge or web server, and disable conflicting application-level redirects. Back up configuration and obtain administrator approval before changing server rules. Validate configuration before any approved reload or restart; do not restart a production web server as a first diagnostic step.
5. Test login and admin paths separately
If the front end works but /wp-admin or login loops, review recently changed security, login, canonical-URL, and caching plugins using an approved maintenance procedure. A plugin conflict is more likely when only one path loops. If a plugin must be disabled for testing, record the change, preserve access controls, and re-enable or replace it after the test.
6. Purge caches and retest
After recording the original behavior and making a controlled correction, clear browser site data and purge WordPress page or object caches plus hosting and CDN caches. Retest the HTTP address, HTTPS home page, login page, and a representative internal page. A cached 301 or 302 can persist after the live configuration is corrected.
7. Update remaining HTTP references
Once the redirect chain is fixed, back up the database before changing stored URLs. Use a reputable WordPress migration tool or WP-CLI search-and-replace with a dry run first, and use a tool that handles serialized WordPress data. Replace only the old site origin with the HTTPS origin; do not broadly replace every http:// value because third-party URLs and intentionally external resources may not belong to the site.
Prevention & how to verify the fix
- Record the site’s canonical HTTPS origin and update both WordPress URL settings during the migration.
- Choose one documented location for the HTTP-to-HTTPS redirect and review other layers before enabling a force-SSL plugin.
- Document whether a CDN or reverse proxy terminates TLS and how the origin learns the original protocol.
- Test the home page, an internal page, login, and the dashboard after each HTTPS configuration change.
- Back up configuration and the database before editing
wp-config.php, rewrite rules, or stored URLs. - After redirects work, run a targeted HTTPS URL migration and check for mixed-content references.
When to get outside help
Contact the hosting provider or CDN/load-balancer administrator when you cannot determine which layer returns each Location: header, when the origin and edge report different schemes, or when changing rewrite rules could affect other sites. Contact the plugin developer when only a plugin-controlled path loops after server settings, WordPress URL settings, and proxy detection are correct. Share the hostname, affected paths, approximate test time, and a redacted redirect chain; remove cookies, authorization headers, and other sensitive values first.
Frequently asked questions
Can incorrect WordPress URL settings cause an HTTPS redirect loop?
Yes. If either the WordPress Address or Site Address remains HTTP while another layer requires HTTPS, WordPress and the server can disagree about the canonical scheme. Set both to the intended HTTPS origin, including any required subdirectory.
Why does WordPress redirect forever behind a CDN or reverse proxy?
The CDN may serve HTTPS to the visitor while connecting to the origin over HTTP. If the original protocol is not forwarded or WordPress does not safely recognize the trusted forwarded value, WordPress can keep treating the request as insecure.
Should I disable all HTTPS redirects except the plugin?
Not automatically. The appropriate enforcement layer depends on the hosting architecture. Select one deliberate layer, verify that it handles the intended traffic, and remove conflicting rules rather than enabling another redirect blindly.
Can an old HTTP link in a post cause “too many redirects”?
Usually not. Old internal links generally cause a single HTTP-to-HTTPS redirect or mixed-content warnings. Update them, but first inspect the actual response chain if the site itself is looping.
Why does only wp-admin or the login page redirect?
A security, login, canonical-URL, or admin-HTTPS plugin may apply a path-specific rule. Review recently changed plugins and admin HTTPS settings while also checking proxy scheme detection and cookies.
Will clearing the cache fix the redirect loop?
It can remove a stale cached 301 or 302, but it will not correct a live configuration conflict. Clear caches after a controlled fix, then verify the response headers again.
Further documentation
For implementation details, consult the WordPress documentation covering WP_HOME, WP_SITEURL, and HTTPS detection; the documentation for the active web server’s rewrite rules; the CDN or reverse proxy documentation for forwarded-protocol handling; and the documentation for any SSL, security, login, or caching plugin involved. Use guidance that matches the site’s actual hosting stack, because redirect behavior differs between direct-origin and proxied HTTPS.