Need to find out how to fix redirect errors in WordPress?

Your site websites does not appear and your browser tells you that there are too many redirects. Such a mistake probably makes you scratch your head, but you can stop frowning, because there is an easy solution. This type of error is known as a 301 error, but can sometimes appear as 404 error "page not found"  

It's not all that dramatic, but the problem is that your browser can't access your website because the address you entered doesn't point to the right place. 

But before, if you have never installed WordPress discover 

But before, if you have never installed WordPress discover How to Install a WordPress Blog in 7 Steps et How to search, install and activate a WordPress theme on your blog.

Then back to why we are here.

fix redirect errors on WordPress - windows redirect loop

To resolve the issue, all you need to do is adjust your website URL settings, but depending on the circumstances, the fix may require a little more effort.

Don't worry, because in this tutorial we are going to see the real meaning of this error, how it manifests itself and how to fix it by changing a few settings or with a little code.

Reason for this error

Most of the time, these error messages occur when there is a configuration error in your settings, but sometimes it can be more complicated than that.

You may see these error messages if:

  • Your website's home page and URLs are different or incorrect
  • There are WordPress plugins installed that are misconfigured and operate in redirection
  • There is an error with the custom modifications on the file .htaccess
  • A new website is created in your network with the same URL as a deleted website

These errors may all seem trivial, but any one of them can break your website and cause a redirect error. Solving these probable causes is the next step in getting your blog up and running.

How to get out of the loop

A closer look at each of the possible causes ofredirection error can help you identify an error that your website is encountering. After you apply the patch, your website should start to appear again. You can try other solutions.

The website home page and URLs

The home page URL is the address you want your visitors to enter in their browsers to access your website. You will find this configuration below the name of your blog in the page Settings> General for single WordPress installations, and represents the website address.

The website URL is where your website and its files can be found. It is also called theaddress of WordPress (URL)  on the general settings page for individual installations.

If these two URLs are not correctly defined or there is a typo, then this could lead to a redirection error. In principle, the value of both is the same, but this is not always the case. They should also to include a bar at the end and must be consistent in their structure.

Both URLs must also have " http:// Â» forward, unless you have a SSL certificate installed, in which case you will have to use " https://"

If any of the addresses include a www. At first, the other should also have this. You shouldn't end up with a WordPress URL and website URL similar to this:

Showing WordPress Regalge Links

If you can not access the general settings page or if you have a multisite network, you can always edit these URLs to make sure they are correct. Add the code below to your file wp-config.php :

define ('WP_HOME', 'http: //yoursite.com'); define ('WP_SITEURL', 'http: // votresite .com');

These two lines must also be placed above the comment /* That's all, stop editing! Happy blogging */.

Keep in mind that you need to replace http://votresite.com with your real url. Also, if you have only one installation, you will not be able to modify these addresses in the settings of the dashboard after adding these two lines.

Redirects made by a plugin

WordPress uses the function wp_redirect () to be used by permalinks, some plugins and WordPress themes. This function allows you to redirect to another page of your website. It can also be used to make 301 redirects.

Once a redirect is in place, it changes where an address is pointed to another destination.

A 301 redirect can be useful if you want visitors to an old article you wrote to be automatically redirected to a new, updated article on the same topic, for example, but there are other reasons why a redirect might be helpful. 

For example, if you have a new domain name and want to send your users to your new domain.

Continue consulting How to make a redirection on your WordPress blog

If you have tried to point an article, page, or subweb in your network to one that already exists, visiting the page will result in a redirect error. The unique URL will be attached to two pages and the browser will not know which page is the correct one.

If WordPress does not let you create duplicate links when you're writing an article, it's possible to accidentally create duplicate links if you use a plugin that creates 301 redirects for you.

To resolve this issue, disable any plugins you have installed that use the wp_redirect () function. If you are not sure which plugin is causing the redirect, you can deactivate all plugins, by changing the plugins folder in "wp-content" via your FTP server.

Check that your site is displayed normally. If the site is displayed, you can gradually activate the plugins to detect the cause of the plugin.

Discover also the 6 regular questions related to SEO and redirects

Restore the .htaccess file

Do you remember when you made custom changes to your file .htaccess ? If it's recent, then that's probably the root of the problem. Check the file to verify that there are no duplicate redirects or URLs that are not correct.

If you can not find anything, you can download a copy of your .htaccess file as a backup and download a new copy without all your customizations. You can discover the content that your new file should have by visiting the .htaccess page on the WordPress Codex.

Download the new copy to your website and try to visit the main page. If your website is showing, then the .htaccess file was responsible. Try adding them again, one by one, until you find the error.

Go further in handling this file by consulting the 5 htaccess tricks to improve the security of your WordPress blog

Clear your browser cache and cookies

Sometimes it is enough to clear your browser's cache and cookies. If you make a major change to your website, it may not be accessible until you completely clear your cache or cookies.

Since a static copy of your website is temporarily saved in your browser to load faster, this means that new changes cannot be taken into account if you do not delete, the changes will not be taken into account. .

Discover How to clean the cache of your WordPress blog

If you get into the habit of backing up your website often. The easiest solution would be to restore the version of your blog files.

Discover also some premium WordPress plugins  

You can use other WordPress plugins to give a modern appearance and to optimize the handling of your blog or website.

We offer you here some premium WordPress plugins that will help you do that.

1. MonsterInsights

The one we love ggenerally considered the king of WordPress plugins analysis MonsterInsights is a great tool to display your statistics. It is also the most popular Google Analytics plugin on WordPress, with over 3 million active installs.

best WordPress plugins to add Google Analytics

Like many plugins on this list, MonsterInsights places your Google Analytics tracking code on your website with no coding on your part. It then pulls your data into a user-friendly interface that runs inside your WordPress dashboard and provides flexibility for growing websites with its free and premium versions.

Even the free version is one of best WordPress plugins analysis available. It offers all the Google Analytics data you expect. You will get more advanced features such as WooCommerce reports with the premium version.

Additional features of this plugin are Google AdSense and affiliate link tracking in your dashboard, Google Analytics event tracking, compatibility with WordPress AMP plugins and the ability to track performance of forms, YouTube integrations and Vimeo and references from other websites.

DownloadDemo Web hosting

2. Super Backup & Clone - Migrate

The WordPress Super Backup & Clone - Migrate plugin will allow you to back up your website. Indeed, working on your website is always a long and cumbersome process, and it would be a shame if you lost your work due to a bad configuration or a handling error.

Super backup clone migrate for wordpress

Its main features are: an intuitive dashboard, the ability to keep several instances of backups, the migration to another possible server, Restoring backups, automatic diagnostics, excellent customer support, multisite support, etc.

This WordPress plugin is a reliable backup solution that will help you avoid losing your data. 

Download | Demo | Web hosting

3. Slider Revolution

Revolution Slider is an innovative and responsive carousel WordPress plugin that displays your content beautifully. Whether it's a slider or a carousel, its visual editor drag and drop will allow you to tell for example the history of your company, to highlight your best products, your best articles and more

Slider revolution wordpress plugins create slide shows website slides

Its features are: an excellent slide creation interface, drag and drop slide design, fully responsive layout, perfect management of multimedia content, optimized performance, multilingual, delivered with nearly 340 graphic elements, numerous slideshow templates offered, compatibility with the majority of WordPress themes excellent customer support, support for touch screens, updates free and regular, documentation and video tutorials available and much more.

Download | Demo | Web hosting

Recommended Resources

Discover other recommended resources that will help you resolve other errors commonly encountered in WordPress. 

Conclusion

Here is ! That's it for this tutorial dedicated to correcting redirect errors on WordPress. Do not hesitate to share it with your friends on your Social Media preferred. 

However, you will also be able to consult our resources, if you need more elements to carry out your projects of creation of Internet sites, by consulting our guide on the WordPress blog creation.

But, in the meantime, tell us about your Comments and suggestions in the dedicated section.

...