Arama Yap Mesaj Submit
Request a Callback
+90
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro

Contact Us

Location Halkali merkez neighborhood fatih st ozgur apt no 46 , Kucukcekmece , Istanbul , 34303 , TR
WordPress Technical Guide

WordPress Too Many Redirects and wp-admin Login Loop Solution

ERR_TOO_MANY_REDIRECTS indicates that the browser is constantly being redirected between the same URLs (301/302). If you are being redirected to the login page after logging in to wp-admin, check the cookie, home/siteurl, HTTPS detection, Cloudflare proxy, and security plugins separately.

Too Many Redirectswp-adminCookiesHTTPSCloudflare
root@server:~SSH
ERR_TOO_MANY_REDIRECTS
HTTP/2 301 location: https://www.example.com/
HTTP/2 302 location: https://example.com/wp-login.php
WordPress LayerKernel, theme and plugin behavior.
PHP layerVersion, extension, limit, and fatal error
Server layerWeb service, database, disk, and logs
Secure MethodBackup, log, isolate, and verify
01
Technical description

What causes the WordPress redirect loop and login retry?

When one layer redirects HTTP to HTTPS, another layer redirects HTTPS back to HTTP, or www to non-www, with a conflicting rule, the request cannot reach the target. Similar loops can be created by cookie path/domain and WordPress URL values on the wp-admin side.

WP_HOME and WP_SITEURL constants can override the home/siteurl values in the database. Changing settings in the panel alone will not provide a solution if the two sources contain different protocols or domain names.

When using Cloudflare Flexible SSL, the origin sees HTTP and WordPress tries to force HTTPS, which can create a loop. The full or full (strict) structure, origin SSL, and correct proxy headers should be preferred.

Logging in and returning to wp-login.php every time is not always a password error. Investigate cookie domain, cache, security plugin, reverse proxy, and corrupted user meta records.

Redirect Chain should be followed using curl, recording each step's Location header. Browser cache cleaning only separates the old redirect on the client-side.

Define a single authority instead of setting all HTTPS and www rules simultaneously across different layers; CDN, web server, WordPress, and plugins should not repeat the same task.

02
Log messages and their meanings

WordPress redirect, login, and cookie error messages

Search for the phrase you see in the email, browser, or SSH log. Each card includes meaning, probable cause, and safe initial action.

8 registration
01kritik

ERR_TOO_MANY_REDIRECTS

Meaning: Browser has reached the redirect limit.

Possible cause: HTTP/HTTPS, www, or plugin rules are creating a loop.

curl -IL ile Location zincirini kaydedin.
02warning

wp-admin login again after login screen appears

Meaning: Session cookie is not accepted or authentication is lost.

Possible cause: Incorrect URL, cookie domain, cache, or security plugin.

Verify browser cookie and site URL.
03warning

Cookies are blocked or not supported

Meaning: WordPress could not read the test cookie.

Possible cause: Header output, domain/path or browser block.

Check the headers already sent log and cookie settings.
04kritik

HTTP ↔ HTTPS loop

Meaning: Origin and proxy protocol cannot be agreed upon.

Possible cause: Flexible SSL or X-Forwarded-Proto missing.

Correct the Origin SSL and proxy HTTPS detection.
05kritik

www ↔ non-www loop

Meaning: Two-layer reverse main domain rule is applied.

Possible cause: Cloudflare rule collides with WordPress URL.

Choose a single canonical hostname and sync all subdomains.
06warning

wp-login.php 302 loop

Meaning: After identity verification, redirect_to is going back to login again.

Possible cause: Plugin, user permission or cookie issue.

Skip plugins and test the user.
07warning

Redirected you too many times after migration

Meaning: Old domain/protocol registrations have been transferred.

Possible cause: home/siteurl and serialized URLs are not up-to-date.

Backup before safe search-replace.
08kritik

Headers already sent

Meaning: Cookie/header was sent before output was generated.

Possible cause: BOM, space, or PHP warning.

Find the first output file from the log.

No records matching this expression were found.

03
Secure first review

SSH diagnostic commands and what output to look for?

Commands are for root access. Collect only status and logs first; Do not change the permanent setting without seeing the reason.

Redirect Chain
curl -sSIL --max-redirs 15 https://example.com/

Displays the Location header for each 301/302 step.

WordPress URL Values
wp option get home
wp option get siteurl

Displays the main URLs in the database.

wp-config URL sabitleri
wp config has WP_HOME && wp config get WP_HOME
wp config has WP_SITEURL && wp config get WP_SITEURL

It checks whether it invalidates or not the database of the statics.

Plugin-free login test
wp --skip-plugins user list

The plugin tests WordPress user layer without plugin installation.

Cloudflare/proxy headers
curl -sSIk https://example.com/ | grep -Ei 'location|server|cf-ray'

Displays proxy and redirect headers.

Reset user sessions
wp user session destroy KULLANICI_ID --all

Clears the old session tokens of a specific user.

04
By hosting environment

Controls to be applied on cPanel, Plesk and panelless server

The root cause of the WordPress error is the same, but log paths, PHP settings screens and service management vary depending on the hosting infrastructure used.

cPanel / WHM

cPanel: Domains Redirects, SSL Status, and .htaccess Rules are checked collectively.

  • Remove the reverse rules in the Domains > Redirects section.
  • Verify that the AutoSSL certificate is valid on the origin
  • Match .htaccess HTTPS/www rules with WordPress URL
cd /home/KULLANICI/public_html && wp option get home && wp option get siteurl

Plesk Obsidian

Plesk shows the Hosting Settings and Apache & nginx Settings guide.

  • Make your preferred domain selection the same as your WordPress URL.
  • Do not conflict permanent SEO-safe 301 and WordPress plugin redirects.
  • Review proxy mode and additional nginx directives.
cd /var/www/vhosts/ALANADI/httpdocs && wp option get siteurl

Panel-less Linux Server

In a panel-less server, reverse proxy headers and vhost redirections are directly reviewed.

  • Verify that the X-Forwarded-Proto header has been forwarded to the application.
  • Use single HTTPS and hostname rule in Nginx/Apache.
  • Look for conflicting vhosts in the config output for the same domain
nginx -T 2>/dev/null | grep -nE 'server_name|return 30[12]'
05
Safe solution order

Steps to Resolve WordPress ERR_TOO_MANY_REDIRECTS Issue

Make the Redirect Chain visible, synchronize URL and protocol sources, and test the impact of cookies and extensions in a controlled manner.

1

Location zincirini kaydedin

Determine which URL loop using curl.

curl -sSIL --max-redirs 15 https://example.com/
2

Match home and siteurl values

Verify that protocol, www preference and path values use the same canonical structure.

wp option get home && wp option get siteurl
3

wp-config settings check

WP_HOME/WP_SITEURL is present, it is applied before panel values.

wp config list | grep -E 'WP_HOME|WP_SITEURL'
4

Fix CDN and origin SSL mode

Prefer Cloudflare Flexible instead of valid origin SSL with Full (strict).

5

Separate cookie and add-on effects

Apply hidden window, cookie cleaning and WP-CLI test without plugins.

wp --skip-plugins user list
6

Leave a single redirect authority

Centralize the www/HTTPS rule in either a CDN, web server, or WordPress.

curl -sSIL https://example.com/
06
Distinction by symptom

Special scenarios and decision trees

Only wp-admin is in a loop

Cookie, security add-on, and admin URL filters are inspected.

wp --skip-plugins user list
Started when Cloudflare was turned on

SSL mode, Always Use HTTPS and Page Rules/Redirect Rules are checked.

curl -sSIk https://example.com/
Login is repeating after migration

home/siteurl and old domain records are fixed with safe search-replace.

wp search-replace 'eskisite.com' 'yenisite.com' --dry-run
Loop occurs when www is added

WordPress URL is Made Same as Web Server Preferred Domain

wp option get home
Only a single user cannot log in

Session tokens, role and user meta records are examined.

wp user get USER

Absolutely don't

  • Do not assume that repeatedly changing the password is the only solution.
  • Do not replicate HTTP/HTTPS rules simultaneously in CDN, .htaccess, and plugins.
  • Do not corrupt serialized values in the database with SQL replace.
  • Do not randomly define cookie constants.
  • Do not force HTTPS without SSL validation.
  • Do not delete all 301 rules without saving the redirect chain.

Post-solution verification

  • The main domain performs at most one canonical redirect.
  • wp-login and wp-admin are not entering the loop after login.
  • home and siteurl are in the same protocol/host format.
  • Origin SSL is valid and the proxy is sending the correct protocol header.
  • In the browser, a WordPress auth cookie is being generated.
  • The new location chain ends at the expected target.
07
Official technical resources

WordPress and WP-CLI official documentation

08
Internal SEO content set

Related WordPress error solutions

09
Frequently asked questions

WordPress Redirect Loop Curiosities about

What causes ERR_TOO_MANY_REDIRECTS?

This occurs due to the redirection rules in different layers being mutually contradictory.

Is cleaning cookies a permanent solution?

Use only to separate the old client cache; if there is a server-side loop, it is not a permanent solution.

Why does Cloudflare Flexible SSL cause problems?

Visitors may see the origin as HTTP when using HTTPS and WordPress can create a loop by redirecting to HTTPS again.

What is the difference between WP_HOME and WP_SITEURL?

WP_HOME sets the visitor's address, while WP_SITEURL sets the address of the WordPress core files; they should be compatible in most standard installations.

Why does the login page appear again after login?

Auth cookie cannot be saved, URL/path does not match or security/cache plugin is breaking the session.

Must I use www?

Both are possible; the important thing is to make a single canonical preference and direct all layers to it.

How do I see a redirect loop?

The curl -IL command displays each Location header in sequence.

EKA SOFTWARE AND INFORMATION SYSTEMS

Let's fix the error on your server permanently

By analyzing cPanel, WHM, CloudLinux, LiteSpeed, MariaDB, Exim and security layers together, we fix the root cause of the failure instead of just removing the service.

Get Server Support WhatsApp
Top