Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

How to Fix SSL and Redirect Loops on the WordPress Admin Page

A practical, layer-by-layer guide to fixing WordPress wp-admin SSL loops, ERR_TOO_MANY_REDIRECTS, and repeated returns to the login page.
Length9 min Posted Quest giverVGSources Team

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If /wp-admin/ keeps redirecting, WordPress, your origin server, and an SSL-terminating proxy are usually disagreeing about the request’s HTTPS scheme or canonical host. The reliable fix is to trace the redirect chain, choose one HTTPS hostname, make WordPress constants and database values match it, teach WordPress which requests were originally HTTPS, and leave HTTP-to-HTTPS redirection to one layer only. Then test with fresh cookies and caches before re-enabling admin SSL enforcement.

What an SSL redirect loop means

A browser reports ERR_TOO_MANY_REDIRECTS when it receives redirects that never settle on one URL. A common pattern is:

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • The browser requests https://example.com/wp-admin/.
  • A CDN, load balancer, or reverse proxy decrypts TLS and sends an ordinary HTTP request to the origin.
  • WordPress sees HTTP and redirects to HTTPS.
  • The proxy presents HTTPS to the browser again, but repeats the same HTTP request to the origin.

Another pattern alternates hosts, such as www.example.com and example.com, or alternates between stale http:// and current https:// values in WordPress. Login cookies can also appear to fail when the browser is sent between schemes or hosts, returning you to wp-login.php instead of the dashboard.

The objective is not to add more redirects. It is to make every layer agree on one canonical HTTPS URL and on where TLS ends.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

1. Record the complete redirect chain

Do this before changing configuration. A redirect that looks harmless in the browser can hide a host change, a repeated status code, or a proxy-generated hop.

  1. Open your browser’s developer tools, select the Network panel, enable recording, and request https://example.com/wp-admin/. Record each response status, hostname, scheme, and Location target.
  2. From a terminal, run curl -I -L https://example.com/wp-admin/. The -I option requests headers and -L follows redirects so you can see the whole sequence.
  3. Repeat the check for https://example.com/wp-login.php and one ordinary front-end URL. An admin-only loop points toward SSL enforcement, authentication cookies, or an admin plugin; a loop on every URL points toward canonical URL or proxy rules.

A healthy chain may contain one redirect from HTTP to HTTPS and one host normalization redirect, but it must converge on a single HTTPS hostname. If the chain alternates between HTTP and HTTPS, inspect proxy scheme detection. If it alternates between www and the bare domain, inspect canonical host settings. If the final response repeatedly points to the same URL, look for duplicate redirect owners or a plugin that is adding a second rule.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Make WordPress use one canonical HTTPS URL

Check WP_HOME and WP_SITEURL

Open wp-config.php and look for existing definitions of WP_HOME and WP_SITEURL. During recovery, you can force both to the exact public URL that should appear in the browser:

define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );

Replace example.com with your real canonical host. Do not use an alternate hostname, an old HTTP scheme, or a host that is only reachable inside your network. If these constants already exist, edit the existing lines rather than adding duplicate definitions. A duplicate definition can leave you unsure which value is active and may generate PHP notices.

WP_HOME is the public address visitors use, while WP_SITEURL is where the WordPress application is installed. In the usual single-site installation they are identical. If your installation intentionally separates them, preserve that design and verify both values use the correct HTTPS authorities; do not collapse them merely to hide a configuration error.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

Inspect the database URL options

WordPress also stores URL values in the options table as home and siteurl. Check these values through the database administration tool supplied by your host or through a safe database management workflow. Look specifically for:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • http:// where the site now uses HTTPS;
  • a stale www or bare-domain variant;
  • an old staging, migration, or temporary host;
  • values that disagree with the constants in wp-config.php.

WordPress documentation identifies conflicting site URL settings as a frequent cause of login and “too many redirects” failures. Change only the incorrect authority and scheme, and keep a database backup or export before editing. If constants are forcing a value, changing the database alone will not alter the runtime value; the two sources must describe the same canonical arrangement.

3. Tell WordPress when HTTPS terminated at a proxy

When a browser connects over HTTPS to a CDN, load balancer, or reverse proxy, the proxy may connect to the origin over HTTP. That is acceptable only if the proxy communicates the original scheme and WordPress trusts the information. Otherwise WordPress believes the request is HTTP and redirects to HTTPS on every pass.

Use the forwarded scheme detection pattern

WordPress documents this pattern for a trusted reverse proxy that sets HTTP_X_FORWARDED_PROTO:

if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
     && strpos( $_SERVER['HTTP_X_FORWARDED_PROTO'], 'https' ) !== false ) {
    $_SERVER['HTTPS'] = 'on';
}
define( 'FORCE_SSL_ADMIN', true );

Place the detection code before WordPress determines whether the request is secure. Use it only when the proxy is under your control or otherwise trusted and actually supplies the header. A client should not be able to forge a trusted HTTPS indication by sending an arbitrary header directly to the origin. If the origin is publicly reachable, restrict direct access or configure the web server so only the trusted proxy can reach it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

The example also enables FORCE_SSL_ADMIN; you should add that constant only after scheme detection is working, as described below. If your proxy uses a different, documented header, adapt the detection to that environment rather than blindly accepting every incoming value.

Pass the complete proxy context

An Nginx reverse proxy should preserve the request context that WordPress and the origin server need. The WordPress HTTPS handbook’s proxy example passes:

  • Host
  • X-Real-IP
  • X-Forwarded-For
  • X-Forwarded-Host
  • X-Forwarded-Proto

The critical value for this loop is usually X-Forwarded-Proto: https when the visitor’s connection was HTTPS. A missing or incorrect host header can create a second loop by making WordPress construct links for the wrong domain, so verify both host and scheme in the proxy configuration.

4. Give HTTP-to-HTTPS redirects one owner

Redirects can be generated by the web server, WordPress, a CDN dashboard, or a security/performance plugin. Two layers are not automatically wrong, but overlapping rules make loops likely, especially when one layer redirects to HTTP while another insists on HTTPS.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Origin-only redirect

Use the origin server as the redirect owner when traffic reaches it directly or when the proxy passes the original scheme correctly. The origin should redirect plain HTTP requests to the canonical HTTPS host, while already-HTTPS requests pass through without another rewrite.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Edge or CDN redirect

If a CDN terminates TLS, its edge “Always Use HTTPS” feature can redirect visitors before the origin receives the request. Cloudflare’s guidance is to evaluate existing redirects both at the origin and in its dashboard and to avoid rules that send requests back to HTTP. Enable the edge redirect only when the origin’s encryption mode and URL rules are compatible with it.

Temporarily disable one redirect layer while diagnosing. Once the chain is stable, choose the layer that best fits your architecture and remove duplicate rules from the others. Do not create a rule that redirects HTTPS to HTTP as an intermediate step; that merely guarantees a conflict with an HTTPS policy.

5. Enable forced SSL for the dashboard only after detection works

define( 'FORCE_SSL_ADMIN', true ); makes WordPress send login and administration sessions over SSL. It protects the intended destination, but it does not solve incorrect proxy detection. If WordPress still sees every proxied request as HTTP, enabling the constant can reproduce the infinite loop described in the WordPress documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. First confirm that an HTTPS request arriving through the proxy sets the expected forwarded scheme and that WordPress recognizes it as secure.
  2. Test /wp-login.php and /wp-admin/ without forced admin SSL if necessary.
  3. Only after those requests remain on the canonical HTTPS host, add or restore FORCE_SSL_ADMIN.
  4. Repeat the tests from a private browser window to avoid reusing old cookies or cached redirects.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

6. Rule out plugins and themes that add redirects

A plugin can force HTTPS, change the login URL, enforce a preferred host, or rewrite authentication cookies. A theme can also alter front-end redirects, although an admin-only loop more often involves a plugin or server setting.

  1. Back up the files or ensure you have SFTP, FTP, or filesystem access.
  2. Temporarily rename the plugins directory, for example to plugins.disabled. This prevents ordinary plugins from loading without requiring dashboard access.
  3. Request /wp-login.php and /wp-admin/ again. If the loop stops, restore the directory name and reactivate plugins one at a time until the conflicting component is identified.
  4. If the problem remains, apply the same isolation approach to mu-plugins, whose code loads automatically and cannot be disabled from the normal Plugins screen.
  5. When a theme is suspected, switch to a bundled WordPress theme using a recovery method available to you, then retest. Restore the original theme after identifying the cause.

WordPress troubleshooting guidance recommends disabling plugins and switching to a bundled theme when login or loopback behavior fails. Keep the URL and proxy corrections in place while testing; otherwise you may mistake a configuration change for a plugin fix.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

7. Clear cookies, caches, and cached 301 responses

After correcting the configuration, remove stale client and intermediary state. Delete cookies for the site, clear the browser cache, purge any CDN cache, and account for cached permanent redirects. Then open a private window and test all three paths:

  • /wp-login.php for the login form and authentication cookie;
  • /wp-admin/ for the dashboard redirect;
  • a normal front-end URL for the site-wide canonical behavior.

Cookie clearing is an official first step for WordPress login redirect loops because a cookie issued for one scheme or host may not be sent to another. If a browser still loops but curl now converges, stale browser state is the likely explanation. If both continue looping, return to the server and proxy layers rather than repeatedly clearing cookies.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

8. Escalate failures that are outside WordPress

If the URL values, proxy scheme, redirect ownership, and extensions are correct but WordPress cannot complete loopback requests, ask your hosting or infrastructure administrator to inspect the server path. WordPress troubleshooting guidance specifically calls out:

  • firewall rules blocking the site from calling itself;
  • DNS resolving the hostname to an unexpected address from the server;
  • certificate or TLS configuration at the origin or proxy;
  • HTTP authentication rules that require credentials for internal requests.

Provide the recorded redirect chain, the hostname used, the TLS termination point, and the time of the test. Those details let an administrator distinguish a WordPress redirect from a web-server, DNS, or security-device response.

Choose the fix by the layer that is wrong

Observed condition Likely layer Corrective action Verification
Every URL alternates between HTTP and HTTPS Proxy scheme detection or competing redirect rules Pass the original HTTPS scheme, set $_SERVER['HTTPS'] only for a trusted proxy, and leave one layer responsible for HTTP-to-HTTPS redirects. curl -I -L reaches one HTTPS host without repeating a target.
Host alternates between www and bare domain Canonical host settings Align WP_HOME, WP_SITEURL, database home/siteurl, proxy host forwarding, and server canonical-host rules. All tested URLs end on the chosen hostname.
Only login and admin requests loop FORCE_SSL_ADMIN, cookies, or an authentication/security plugin Fix HTTPS detection first, then test with fresh cookies and isolate plugins and must-use plugins. /wp-login.php loads and the session reaches the dashboard.
Loop continues after WordPress code is isolated Origin server, CDN, DNS, firewall, or HTTP authentication Inspect edge and origin redirect policies and escalate infrastructure checks to the host. Server logs identify the component issuing the repeated Location header.

Prevent the loop from returning

  • Document which component terminates TLS and which component owns the HTTP-to-HTTPS redirect.
  • Keep the public hostname and scheme identical in wp-config.php, the database options, CDN settings, and origin configuration.
  • Ensure the trusted proxy passes the original scheme and host on every request.
  • Review redirect and security plugins after migrations, domain changes, or CDN changes.
  • After enabling forced admin SSL, test login, dashboard, and front-end URLs from a clean private session.
  • Retain a recent backup before editing wp-config.php or database URL options.

The decisive test is convergence: one canonical HTTPS hostname, one consistent scheme as seen by WordPress, and no second redirect rule sending traffic in the opposite direction.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.