HTTP & Indexing Critical 4 min read

How to Fix "ERR_TOO_MANY_REDIRECTS" on Cloudflare & Hostinger

Direct Technical Answer

ERR_TOO_MANY_REDIRECTS almost always happens when Cloudflare's SSL/TLS mode is set to 'Flexible' while your Hostinger server or .htaccess simultaneously forces HTTP → HTTPS redirects—creating an infinite loop between Cloudflare and your origin.

Why Does This Issue Occur? (Symptom & Cause Matrix)

Observed SymptomRoot Technical CauseRecommended Fix
Infinite HTTPS loop behind Cloudflare proxyCloudflare SSL set to Flexible instead of Full (Strict)Switch Cloudflare SSL/TLS encryption mode to Full (Strict)
www vs non-www ping-pong loopWordPress Site URL disagrees with .htaccessMatch WordPress Home/Site URL exactly with server RewriteRule

Step-by-Step Fix Checklist

  1. 1

    Switch Cloudflare SSL/TLS to Full (Strict)

    Open Cloudflare Dashboard → SSL/TLS → Overview and upgrade from Flexible to Full (Strict) if your origin has a valid certificate.

  2. 2

    Check .htaccess for Duplicate Force-HTTPS Blocks

    Inspect public_html/.htaccess for conflicting RewriteCond %{HTTPS} rules injected by multiple plugins.

  3. 3

    Purge Edge Cache & Verify With curl -IL

    Clear Cloudflare & Hostinger CDN cache and verify a clean single-hop HTTP 200 response.

Safe Edge-Aware HTTPS Redirect Rule (Respects X-Forwarded-Proto)

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

People Also Ask About This Error

Why does checking HTTP:X-Forwarded-Proto stop the loop?

Behind Cloudflare or Railway reverse proxies, internal traffic arrives over HTTP while external visitors use HTTPS; X-Forwarded-Proto prevents false origin redirects.

Can redirect loops cause Google de-indexing?

Yes—Googlebot drops URLs that return repeated redirect errors within 24–48 hours.

More Search Console & Performance Fix Guides

24/7 Autonomous Technical SEO Engine

Stop auditing spreadsheets. Let ApexSEO ship fixes 24/7.

Connect your domain via Hostinger FTP, GitHub, or our 1KB cookieless telemetry beacon to automate PageRank internal linking, AI FAQPage schema, and live Google SERP tracking up to 12,000 pages.