Here’s a full SEO-friendly article on the topic “Login Page Redirect Loop”, including causes, fixes, and prevention tips:
Title: Fixing the “Login Page Redirect Loop” Error in WordPress and Websites
Meta Description:
Stuck in a login redirect loop? Learn what causes the “Login Page Redirect Loop” error in WordPress and other websites, plus step-by-step solutions to fix it.
What Is a “Login Page Redirect Loop”?
A Login Page Redirect Loop is a frustrating error where a user tries to log in but is redirected back to the login page — repeatedly — without ever reaching the dashboard or protected area.
This issue can occur in WordPress, custom websites, or applications and is often caused by incorrect cookie settings, plugin conflicts, or misconfigured URLS.
Common Error Message
“This page isn’t working. Redirected you too many times. Try clearing your cookies.”
- Or –
ERR_TOO_MANY_REDIRECTS
Why Does the Redirect Loop Happen?
Here are the most common causes:
- Incorrect Site URL or Home URL
If the WordPress site URL or home URL settings are mismatched, login redirects can loop. - Corrupt Cookies or Cache
Your browser may have saved corrupted cookies or cache from an earlier session. - Plugin or Theme Conflicts
Some plugins (especially redirect, security, or login plugins) can cause a loop. - SSL Misconfiguration
Mixinghttp
andhttps
URLS can confuse redirection rules. - .htaccess Misconfiguration
Redirect rules.htaccess
can conflict with WordPress or server-level redirects. - Wrong File Permissions
The server cannot write the necessary session or login data due to permission issues.
How to Fix “Login Page Redirect Loop” in WordPress
✅ 1. Clear Cookies and Cache
- Open your browser’s settings and clear:
- Cookies
- Cached images and files
- Restart the browser and try logging in again.
✅ 2. Check WordPress URL Settings
Via wp-config.php
:
define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');
Make sure both URLS are:
- Correct
- Use the same
http
orhttps
✅ 3. Deactivate All Plugins
If you can’t access the dashboard:
- Use FTP or File Manager to rename
/wp-content/plugins/
to something like/plugins_backup/
- Try logging in
- If successful, rename the folder back and reactivate plugins one to find the culprit
✅ 4. Switch to Default Theme
Temporarily switch to a default theme like Twenty Twenty-Four:
- Rename your active theme folder in
/wp-content/themes/
- WordPress will auto-switch to the default theme
✅ 5. Fix .htaccess File
Replace with a fresh .htaccess
:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
✅ 6. Force HTTPS Correctly
If using SSL, make sure all settings force https://
, not http://
.
Also update .htaccess
:
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
✅ 7. Set Correct File Permissions
Use these permissions:
- Files:
644
- Folders:
755
wp-config.php
:640
or600
How to Fix Login Redirect Loop in Custom PHP or HTML Websites
- Use
session_start()
at the top of every file - Ensure cookie path/domain is set correctly
- Check for infinite redirects in your login logic:
if (!isset($_SESSION['user_logged_in'])) {
header("Location: login.php");
exit;
}
Make sure this doesn’t redirect again after login.

How to Prevent Login Redirect Loops
- Always use consistent URLS (
https://example.com
) - Use trusted plugins and themes
- Clear cookies after making login or security changes
- Monitor .htaccess and server redirects carefully
- Back up before major updates
Final Thoughts
A Login Page Redirect Loop is annoying but easy to fix once you identify the cause. Whether it’s a plugin, cookie, or URL mismatch, the solutions above will help you resolve it quickly and get back into your dashboard or system.
SEO Keywords to Target:
- login page redirect loop
- fix WordPress login redirect
- WordPress redirect too many times
- ERR_TOO_MANY_REDIRECTS WordPress
- Login keeps redirecting to the login page