Divi: the easiest WordPress theme to use
Divi: The best WordPress theme of all time!
With over 901.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]
Need to find out how to fix redirect errors in WordPress?
Your site website 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" page (in French).
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 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.
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 installed WordPress plugins 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 NOT 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://" page (in French).
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:
Easily create your website with Elementor
Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]
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 do 301 redirects.
Once a redirect is in place, it changes the location where an address points 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.
Are you looking for the best WordPress themes and plugins?
Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]
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. .
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 look and optimize the grip of your blog or website.
We offer you here some premium WordPress plugins that will help you do that.
1. 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.
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.
2. Backup And Restore
Backup And Restore is a WordPress plugin that will help you plan backups of your website to a local server or to different cloud servers such as Dropbox, Google Drive, and Amazon S3. You will have the option to restore your entire website, including the database from existing restore points, with just one click.
Its main features include: full backup of the website, backup on Amazon S3, Google Drive, Dropbox, disk space manager, auto deletion of old backups, complete restoration of your website, support for multisiteEtc. ..
Uploading your website, database and all your backups will also be possible. This WordPress plugin will help you manage backup and restore processes in an easy, secure and reliable way..
Backup is a WordPress backup and migration plugin for your website. It offers the easiest and fastest tools to backup, restore or migrate websites.
Its features are: unlimited backup, unlimited restore, website migration from one hosting / domain to another, downloading backups to local pc, scheduling backups, downloading and exporting from Dropbox, Google Drive and Amazon S3, etc.
Easily create your Online Store
Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [Recommended]
Discover other recommended resources that will help you resolve other errors commonly encountered in WordPress.
- How To Fix 403 Forbidden Error On WordPress
- How to fix 413 error on WordPress
- How To Fix 403 Forbidden Error On WordPress
- How to create a football club website with SportsPress
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 networks preferred.
But, in the meantime, tell us about your Comments and suggestions in the dedicated section.