How to fix “This webpage has a redirect loop” in WordPress

The redirect problem in any web browser is not easy to solve if you’re new to blogging, or if you set up a website for the first time. But, when you look inside the website configurations and some other things, you will easily fix the problem.

Today, I will show you how to fix the WordPress page look redirect problem when you want to access your website homepage, or any other Url from Google Chrome, Firefox or any other browser.

Here is the exact error message in the web browser:

This webpage has a redirect loop

The redirect loop problem appears, in general, when you migrate your website to a new server. And of course, you’ve missed something to add or to edit after moving your files.

In WordPress, for example, users forget to install their blog with the full domain name, if the old installation includes the “www”.

What does the redirect loop error mean?

If you type the webpage URL that has the problem with Google Chrome, for example, you will notice an immediate message about the redirect issues as an error message.

The same thing applies to Firefox, Safari and the other browsers, but with a different error message, such as, “too many redirects” and so on.

The problem is that you’ve many versions of the same URL address and they redirect the user to each other.

As a result, no one of these URL will work, and the browser will work in a closed circle, and turn an error message to the visitor. The problem can be a result of broken htaccess file or a wrong code inserted there.

The second reason that can cause the problem is that you are using Google Page Speed for the website optimization, or any other service like Cloudflare or both of them.

In this case, the Google cache is the problem and the problem is a URL conflict that sends the user to the Google cache, then to the server and vice versa without stopping,

That means that the Google Page Speed service cache is not updated with your latest server content, and even, if you’ve added your new IP to CloudFlare, Google cache is the problem.

The fix is easy, you just need to delete the Google Page Speed cache and build the new one from the new server, follow the below steps,

Fixing the webpage redirect problems

The below solutions depends on the nature of the problem and what causes redirect errors. Just follow them one by one, or try the one that seems appropriate for your case.

1. Reset the Permalinks

The first and easiest solution that can fix the problem is to reset the WordPress permalinks. All you have to do is to login into your WordPress admin area, click on “Settings, then, click on “Permalinks.

The final step is to just click the “save changes” button, and WordPress will automatically regenerate a new htaccess file.

That will replace the old file that can be broken. If you need a step by step tutorial, you can read how to reset permalinks in WordPress.

2. Flush the page caches

If you’re using Google page speed service, you have to login and flash the content including images, and all the Html and CSS files, in your account. Click on “caching and errors” as the following screenshot.

This Webpage Has a Redirect Loop

Then, type your blog URL in the “flush caches” edit box with “*” at the end as the next example.


Flush Caches

Now, click the “flush” button and wait some seconds until the process completes, then, visit your web page after clearing your browser cache or changing the browser to verify things, even more.

3. Set up the site URL

If you have made changes to your blog URL with, or without, the “www”, you need to define your URL in the blog directory. You can do that by logging into your cPanel account, click the “file manager”, and find the “wp-config.php” file, open it and add the next code at the end.


If you can’t find how to edit the file, you can read this post about changing the blog URL.

4. Check your redirect plugin

If you have the Yoast premium SEO plugin or URL redirect tool, then, you may be redirected the same URL many times. So, it will redirect to itself if you configured the redirect by mistake.

All you need is to search for your URL and see if you have multiple redirects. If that’s the case, then, you have the solution, just remove the wrong URL that redirects to the wrong destination.


These are the main solutions to fix the WordPress redirect loop problems, if you fixed it in other ways, you can share them in the comment section. If you’re using other software like blogger etc… these rules can be applied to where the redirect comes from.

You can also run a full website audit with any software to detect bad URL redirects and correct them.

Share This