Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
VGSources
Blog

How to Fix a WordPress Redirect Loop After Enabling Cloudflare

A Cloudflare-enabled WordPress site usually loops because Flexible mode meets an origin HTTPS redirect. This guide shows how to choose Full or Full (strict), repair the origin, remove duplicate rules, handle HSTS, and verify the redirect chain.
Length9 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set Cloudflare to Full or Full (strict), make sure the origin genuinely serves HTTPS, and keep one HTTP-to-HTTPS redirect. The usual ERR_TOO_MANY_REDIRECTS loop happens when Flexible mode sends the visitor to Cloudflare over HTTPS but Cloudflare connects to the WordPress server over HTTP while that server immediately redirects HTTP back to HTTPS. Full and Full (strict) remove that scheme mismatch, provided the origin has a working certificate and port 443 configuration.

Why Cloudflare and WordPress can redirect forever

A redirect is an HTTP response containing a Location header that tells the browser to request another URL. A normal HTTPS migration has one predictable transition: an HTTP request receives an HTTPS location, and the next request returns the page. A loop occurs when two layers keep changing the scheme in opposite directions.

As an Amazon Associate I earn from qualifying purchases.

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.

The common Flexible-mode loop

With Cloudflare set to Flexible, the visitor-to-Cloudflare connection can be HTTPS while Cloudflare-to-origin traffic remains HTTP. If the origin web server, WordPress configuration, or a security rule says “every HTTP request must become HTTPS,” Cloudflare receives a redirect to the HTTPS URL. It then fetches that HTTPS URL from the origin as HTTP again, receives the same redirect, and repeats the cycle. Cloudflare explicitly warns: “If your origin server forces HTTPS by automatically redirecting HTTP requests to HTTPS, do not use Flexible mode.”

The reverse loop in Full or Full (strict)

Full and Full (strict) make an HTTPS connection from Cloudflare to the origin when the visitor requests HTTPS. A loop is still possible if the origin receives that HTTPS request and redirects it to an http:// location. Cloudflare forwards the origin’s response, the browser returns to HTTPS through Cloudflare, and the origin sends the browser back to HTTP again. This pattern is easy to miss because the selected SSL mode appears correct.

#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.

Additional redirect layers

SSL mode is only one part of the chain. WordPress URL values, web-server rewrite rules, Cloudflare Redirect Rules or legacy Page Rules, Always Use HTTPS, and HSTS can each add a redirect. Two rules that express the same policy in different places can create a cycle or add conflicting destinations even when the origin certificate is valid.

Choose the Cloudflare SSL/TLS mode that matches your origin

Mode Connection from Cloudflare to origin Origin certificate requirement Use it when Important limitation
Flexible HTTP No origin TLS requirement The origin cannot support TLS and does not force HTTP requests to HTTPS Incompatible with an origin HTTPS redirect; this is the most common loop configuration
Full HTTPS The origin serves HTTPS, but its certificate does not have to be publicly trusted The origin has TLS but uses a certificate Cloudflare cannot publicly validate Port 443 and a functioning certificate are still required; an origin redirect to HTTP can loop
Full (strict) HTTPS A valid, verifiable certificate covering the hostname The origin certificate is valid and hostname-correct Certificate validation failures produce error 526 rather than solving the connection

In Cloudflare, open SSL/TLS > Overview and select the mode that matches those conditions. If the origin supports HTTPS but its certificate is not publicly trusted, use Full. If the certificate is valid and verifiable for the hostname, use Full (strict). Flexible is suitable only when the origin cannot provide TLS and has no rule that upgrades HTTP to HTTPS.

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

Recovery procedure: stop the loop without losing access

1. Confirm that the symptom is a redirect loop

  1. Open the affected hostname in a private browser window so an old cached redirect is less likely to influence the result.
  2. Use the browser’s developer tools and open the Network panel. Request the page and inspect each response’s Location header.
  3. Write down the sequence exactly. Repeated https:// to http:// and back identifies the layer disagreeing about the scheme. A redirect to a different path, hostname, or login URL indicates a separate rule that must also be reviewed.

Do not infer the cause from the browser message alone. The first response that changes the URL is the useful clue; the browser’s final error only reports that the chain exceeded its limit.

2. Correct the Cloudflare encryption mode

  1. Sign in to Cloudflare and select the affected zone.
  2. Open SSL/TLS > Overview.
  3. If the origin forces HTTPS, change Flexible to Full or Full (strict) according to the certificate table above.
  4. Save the setting, then retest the hostname after the change has taken effect.

Changing to Full (strict) is not a substitute for installing a valid certificate. It is the right end state only when the certificate covers the requested hostname and can be verified by Cloudflare.

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

3. Make the origin serve HTTPS on port 443

For either Full mode, the origin must accept HTTPS connections on port 443. Verify that the web server has an HTTPS listener, that the certificate is installed for the WordPress hostname, and that the virtual host serves the intended site rather than a default host. If Cloudflare cannot connect to the required port, correct the listener or firewall configuration before investigating WordPress redirects.

An Origin CA certificate is one option Cloudflare documents for securing the Cloudflare-to-origin connection. It is useful for Full (strict) only when the certificate is correctly installed and recognized for the hostname in the Cloudflare-to-origin relationship; the browser does not use that certificate directly because the browser connects to Cloudflare.

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

4. Remove an HTTPS-to-HTTP rule from the origin

In Full or Full (strict), inspect web-server rewrite and redirect rules for any instruction that sends an HTTPS request to an http:// URL. Remove or correct that rule. The origin should preserve HTTPS when the incoming request is already HTTPS; only an intentional HTTP-to-HTTPS policy should remain.

Check the server configuration as well as per-directory rules such as the WordPress installation’s rewrite file. A rule can exist outside the WordPress dashboard, so changing the site URL alone may not remove it.

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)

5. Consolidate the HTTP-to-HTTPS policy

List every place that can issue a redirect:

  • WordPress’s site address and WordPress address values.
  • Web-server rewrite rules and hosting control-panel redirects.
  • Cloudflare Redirect Rules and older Page Rules.
  • Cloudflare’s Always Use HTTPS setting.
  • HSTS headers or policies delivered by the origin.

Choose one coherent HTTP-to-HTTPS policy and remove duplicates. For a site that fully supports HTTPS behind Cloudflare, Cloudflare recommends making the edge redirect the single HTTP-to-HTTPS redirect and avoiding an additional redirect at the origin where possible. Do not leave an old Page Rule active after creating a Redirect Rule that performs the same job. Likewise, do not combine a rule that forces HTTPS with another rule that rewrites HTTPS back to HTTP.

6. Check WordPress’s canonical URLs

WordPress must use the same canonical scheme and hostname that visitors use. In the WordPress administration area, review the two URL values in the general site settings. They should both use the final HTTPS hostname, with no accidental alternate hostname, extra path, or trailing variation that another rule normalizes on every request.

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

If you cannot reach the dashboard because the loop occurs before WordPress loads, make the correction through the site’s configured URL values or database-backed configuration using your normal administrative procedure, then remove the temporary override once the canonical values are correct. Avoid changing several URL layers simultaneously; otherwise you will not know which setting ended the loop.

7. Review HSTS deliberately

HSTS tells browsers to use HTTPS for a hostname. It can make a redirect problem appear persistent because the browser may upgrade an HTTP address before contacting the server. Inspect HSTS response headers and any Cloudflare or origin HSTS setting while troubleshooting. Keep HSTS only after HTTPS works consistently through Cloudflare and the origin; otherwise remove or adjust the policy long enough to test the corrected chain. A browser that has cached HSTS may need to be tested separately from a browser without that cached policy.

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

8. Install the Cloudflare WordPress integration and enable Automatic HTTPS Rewrites

Cloudflare recommends its WordPress plugin for reducing redirect-loop and mixed-content problems. After installing it through your normal WordPress plugin process, connect it to the correct Cloudflare zone and enable Automatic HTTPS Rewrites. This feature updates eligible HTTP resource references so images, scripts, and styles do not trigger additional insecure requests after the page itself is on HTTPS.

Automatic HTTPS Rewrites does not repair a server that redirects HTTPS to HTTP, replace a missing origin certificate, or resolve contradictory redirect rules. Treat it as a compatibility measure after the encryption mode and canonical redirects are correct.

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

9. Clear caches only after the configuration is fixed

Clear any WordPress page or redirect cache, the web server’s cache if present, and the browser cache used during testing. Purging caches before correcting the rule can simply store the same bad response again. Test in a private window and from a second browser so a cached redirect is not mistaken for a live configuration error.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use the error code to choose the next branch

Observed result What it indicates Next check
ERR_TOO_MANY_REDIRECTS The browser received a repeating redirect chain Inspect each Location; compare the HTTP/HTTPS sequence and audit every redirect layer
Cloudflare error 521 Cloudflare cannot connect to the origin Confirm the origin is running, listening on the port required by the selected mode, and allowing the connection
Cloudflare error 526 Cloudflare cannot validate the origin certificate Check certificate validity, hostname coverage, installation, and the choice between Full and Full (strict)

A 521 is a connectivity or port problem, not proof of a redirect loop. A 526 is a certificate-validation problem, not a reason to fall back to Flexible when the origin is supposed to serve HTTPS. Fix the underlying origin condition while keeping the mode appropriate for the site’s security requirements.

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.

Read the redirect chain as a troubleshooting map

Chain: HTTPS visitor, HTTP origin, HTTPS response

This is the signature of Flexible mode combined with an origin HTTPS redirect. Set Full or Full (strict), then verify port 443 and the origin certificate.

Chain: HTTPS request, origin sends an HTTP location

This identifies an HTTPS-to-HTTP rewrite at the origin or in a rule applied to the origin response. Remove that downgrade rule and retest before changing WordPress URLs.

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

Chain: HTTP and HTTPS alternate, but the SSL mode is already correct

Look for duplicate edge and origin rules, an obsolete Page Rule, an HSTS policy interacting with an old canonical hostname, or a WordPress URL that differs from the Cloudflare hostname. Disable one suspect rule at a time and inspect the first changed Location response.

Chain: one redirect works, but assets or embedded content fail

The page-level scheme may be fixed while resources still reference HTTP. Enable Automatic HTTPS Rewrites through the Cloudflare WordPress plugin, then address any hard-coded URLs that the feature cannot rewrite. Do not add another page redirect to solve a mixed-content warning.

A configuration checklist for a stable final state

  • The Cloudflare mode reflects the origin’s HTTPS capability and certificate trust: Full for an HTTPS origin whose certificate is not publicly trusted, or Full (strict) for a valid, verifiable certificate.
  • The origin accepts HTTPS on port 443 and serves a certificate for the requested hostname.
  • An HTTPS request is never redirected to an http:// URL.
  • WordPress’s canonical URL values match the public HTTPS hostname.
  • Only one intentional HTTP-to-HTTPS policy is active, preferably at the Cloudflare edge for traffic that is fully proxied.
  • Duplicate Redirect Rules, Page Rules, rewrite directives, and unnecessary HSTS behavior have been removed or aligned.
  • The Cloudflare WordPress plugin and Automatic HTTPS Rewrites are enabled when mixed-content compatibility is needed.
  • Testing shows one stable destination rather than an alternating scheme, and caches have been cleared after the fix.

When to change the plan

If the origin cannot support TLS at all, Flexible may be technically necessary, but it must not be paired with an origin rule that forces HTTPS. That arrangement leaves the Cloudflare-to-origin leg unencrypted and should be treated as a compatibility constraint rather than the preferred configuration. If the site is intended to operate entirely over HTTPS, make the origin serve TLS and move to Full or Full (strict) instead.

If Full (strict) produces 526 after the loop is gone, repair certificate validation rather than adding redirects. If Full produces 521, restore origin reachability and the required port. Redirect troubleshooting ends only when the encryption mode, origin listener, certificate, canonical URL, and single redirect policy all describe the same HTTPS architecture.

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

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.

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
Windows Errors? Fix Them Before They SpreadFree repair scan
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.