One place for hosting & domains

      Error

      The Beginner’s Guide to WordPress 404 Error Pages


      The content you post on your website — whether part of a page or post — is usually permanent. However, if an issue arises (either technical or otherwise), an item of content may not display. Instead, it triggers a 404 error, which isn’t good news for your website or its users.

      In a nutshell, a 404 error signifies that a web page is not found. However, unlike other errors, they’re usually displayed on dedicated pages. With a customized and optimized 404 error page, you can get visitors back on the right track.

      What is a 404 Error?

      Airbnb 404 error page example

      As we discussed, a 404 error is a response code indicating that although a user was able to connect to a website’s server, the page can’t be found. This occurs for a number of reasons, such as:

      • A page or post has been moved or deleted.
      • The server is having trouble loading the page.
      • The URL that leads to the page is incorrect.
      • The post or page never existed in the first place.

      Naturally, a 404 error can significantly reduce your website’s traffic. As such, it’s crucial that you find and fix these errors on your website fast. First, however, let’s look at what 404 error pages are used for.

      An Introduction to 404 Error Pages

      A 404 error page alerts visitors to a missing page or incorrect URL. Many websites use the default page provided by their theme, but 404 error pages can also be customized to improve User Experience (UX).

      Most commonly, an error page will note the issue and provide alternative options for the user to choose from: for example, a Return to the Home Page link, related content, or a Search box.

      A good 404 error page should contain a few essential elements. These include a link or navigation menu, an on-brand apology or explanation, and a Search box.

      For example, Cloud Sigma opted for a quirky explanation and an easy-to-find Back to Homepage button. This helps to lessen the frustration while also enabling the user to return to the main site with minimal interruption:

      404 error page example

      Repair Pal presents another good example of a well-implemented 404 error page. They opted to stick with their default theme — keeping the navigation menu intact — while also providing users with a way to interact immediately with the page.

      For example, visitors can choose to Get an Estimate or Troubleshoot Your Car:

      404 error page example

      As you can see, creating a functional page is a useful way of mitigating the effects of a 404 error. It can also ensure that your website has an air of professionalism, despite an error being present.

      Get Content Delivered Straight to Your Inbox

      Subscribe to our blog and receive great content just like this delivered straight to your inbox.

      How to Find and Fix 404 Errors on Your WordPress Website

      While 404 errors are bound to happen on occasion, frequent occurrences can mean more serious problems are present. For example, there could be issues with your website’s server or with incorrectly set permalinks.

      Fortunately, it’s possible to find these errors within WordPress. What’s more, once the issues are resolved, you can apply what you’ve learned to avoid the problem occurring in the future.

      How to Create a 404 Errors Report in GA4

      Google Analytics is great for rooting out 404 errors. Within the dashboard, go to Explore and choose Blank:

      Google Analytics 4 404 error report

      Name your report “404 Report” and click on the + sign next to Dimensions:

      Google Analytics 4 404 error report

      Select Page title and Page path + query string from the available dimensions and click on Import. Next, click on the + sign next to Metrics to find and import Sessions:

      Google Analytics 4 404 error report

      You’ll now need to drag your Dimensions under Rows and Metrics under Values:

      Google Analytics 4 404 error report

      Next, drag Page title under Filter. Then, choose contains from the dropdown menu and type “Page not found” into the Enter expression box:

      Google Analytics 4 404 error report

      Hit Apply, and you’ll see a report of all the 404 errors on your website. Regardless of whether there’s a wider problem on your site, WordPress makes this easy to fix.

      How to Deal With 404 Errors On Your Website

      Even if you do your best to avoid them, 404 errors are bound to happen from time to time. However, there are ways to minimize their disruption. Let’s take a look at two now.

      1. Create a Dedicated 404 Error Page

      404 error page example

      WordPress is flexible enough to let you edit practically all of your 404 error page’s elements. To create a custom 404 error page for your site, you have two options — manually or using plugins.

      Many themes include a 404.php template file by default. If this is the case for your theme, you can locate the file yourself and edit the message that’s currently in place.

      Before you do that, however, it’s a good idea to create a child theme to work with. That way, you won’t be making permanent changes to the parent theme.

      After creating a child theme, go to Appearance > Editor within WordPress and open 404.php in the file list to the right of the editor:

      WordPress 404 error page template file

      From here, look for the <div class=”page content”> line, and simply edit the message to your own requirements (saving your changes once you’re done).

      Note that if you’re using a WordPress block theme, you can edit its 404 page by navigating to Appearance > Editor > Templates:

      WordPress template editor

      Simply click on 404, and you’ll be taken to an editing screen where you can build a custom 404 page using WordPress blocks and template parts:

      404 error page example

      If you don’t have a 404.php file in your current theme, you can create your own using the guidelines found in the WordPress Codex. However, you’ll need access to an FTP client such as FileZilla.

      Open FileZilla, and enter your website credentials to gain access to your file directory. Double-click your website’s root folder (sometimes called public_html), and navigate to wp-content > themes > [themename] > 404.php. We’re using Twenty Thirteen’s 404 template, but you’re welcome to browse to another theme with a similar template.

      Next, right-click the 404.php file and select View/Edit:

      edit 404.php file via FTP client

      The file will open in your text editor. Highlight the entire code within, and copy it. Now return to FileZilla and navigate back to the themes directory. Select your current website theme and right-click. Select Create new file from the drop-down, and name it “404.php”.

      Click OK, then right-click the new 404.php file. Select View/Edit from the drop-down and paste the code that you previously copied. Of course, you can edit the content to your own requirements. Once you save the file, you’re all set!

      create a 404 error php file

      Alternatively, you can use WordPress plugins such as 404page and Custom 404 Pro to achieve the same goal. Once installed, they enable you to replace your theme’s default 404 page or create one if your theme doesn’t have one included. These plugins will be ideal if you’re wary about tinkering with your WordPress core file structure.

      2. Set Up an Automatic Redirect to a More Useful Page

      No More 404 Errors WordPress plugin

      An alternative to a 404 error page is to just redirect the visitor. Simply put, a page redirect is a way to send traffic from one web page (such as a 404 error page) to another. This is a good choice for a number of reasons.

      For example, if you’ve changed the URL of an old page or post or deleted any old content, you can redirect visitors to the new page. The good news is that there are a plethora of redirect plugins available, including Redirection and Safe Redirect Manager.

      Set Up a 404 Error Page on Your WordPress Site Today

      404 errors require a quick and professional response in order to prevent your website’s traffic from being negatively affected. Fortunately, WordPress makes it easy to manage 404 errors and redirect visitors.

      Do More with DreamPress

      DreamPress Plus and Pro users get access to Jetpack Professional (and 200+ premium themes) at no added cost!

      Managed WordPress Hosting - DreamPress



      Source link

      How to Fix the 503 Error in WordPress


      Server errors can be incredibly frustrating, primarily because it isn’t always clear what’s causing the problem or how you can fix it. The 503 Service Unavailable Error generally means that your server has run out of resources. However, why this is occurring may vary.

      For the most part, a 503 Service Unavailable Error happens because WordPress uses too much memory or because your hosting service is experiencing unanticipated issues. As such, the problem can be resolved by either reducing the amount of memory your site is using or upgrading the resources available on your hosting account.

      This article will look at the 503 Service Unavailable Error, why it occurs, and what problems it can cause. Then we’ll walk through how to troubleshoot and fix it. Let’s get started!

      What Causes the 503 Service Unavailable Error in WordPress

      It’s important to note that this isn’t a WordPress-specific error. It may occur before WordPress has even had the opportunity to start running.

      A 503 Service Unavailable Error typically means your web server ran out of the resources it needs to display your website. This can be frustrating because the error message is extremely vague and doesn’t convey the source of the issue.

      Like an application on your computer, a website requires a certain amount of resources to run. For example, it needs memory, processing power, and hard drive space. This is true no matter what type of hosting you have.

      With that in mind, here are some common causes of this error:

      • Your WordPress site is consuming an unusual amount of resources because a plugin or theme may be operating incorrectly. This is because each plugin that you run demands additional resources.
      • You’re experiencing unusually high volumes of dynamic traffic on your website. If many people are visiting your site at once, your resources are being consumed much faster than they ordinarily would be. The good news is that you can avoid slow loading times and prepare yourself for higher traffic levels in advance.
      • Your web server could be experiencing difficulties of its own. If your web hosting service recently upgraded its software, for instance, your site might not be properly configured or optimized. As a result, your web host might need to restart one or more server processes before you are able to see performance improvements.

      Regardless of the root cause, the 503 Service Unavailable Error is not something that you can ignore. Unless it’s a host-level problem, the error won’t resolve itself, and it will likely create significant issues for your site and visitors.

      Why the 503 Service Unavailable Error Can Cause Problems for Your Site

      When a server-side issue like a 503 Service Unavailable Error pops up, it can be hard to know what you’re dealing with. Every circumstance is different. For example, sometimes, the site might work intermittently. On other occasions, specific pages may go down (the most resource-intensive ones), or your site may stop working entirely for a longer period.

      Here are a few problems that a 503 error may cause for your business:

      • Your visitors will not be able to view your site.
      • Search engines won’t be able to read (and therefore rank) your site.
      • Your site’s utilities (such as security scanning) won’t run properly or at their scheduled times.

      Overall, a 503 Service Unavailable Error makes it difficult for both you and your visitors to use your site. Fortunately, it’s an error that can be easy to fix.

      How to Fix the 503 Service Unavailable Error in WordPress (4 Methods)

      The harsh reality is that all sites will go down occasionally, if only for maintenance. Therefore, it is suggested that you check with your hosting service for any known downtime reports or maintenance windows before you start troubleshooting any 503 Service Unavailable Errors that you may be seeing.

      Your web host’s servers may be down due to a planned service outage or an unplanned emergency. In that situation, all you’ll need to do is wait until your server is back up and properly configured. Then, if the server begins working again and your site is still down, you can attempt to manually reboot your service to see if that resolves the issue.

      Should that not work, you may need to start troubleshooting yourself. Here are some useful strategies you can try.

      1. Turn Off Your Plugins

      All plugins modify the way that a WordPress site works. Some of them only affect a few elements of a single page, while other plugins dramatically alter your entire site’s functionality.

      When it comes to plugins, you might be facing one of two problems. First, you may have recently installed a new plugin that utilizes too many of your server’s resources. Alternatively, you could have too many plugins running overall, and the newest plugin just so happens to be the one that has tipped the scales.

      The bottom line is if you’ve recently installed a new plugin, you may need to deactivate it. To do this, you can go to your WordPress dashboard.

      WordPress plugins page

      Go to Plugins > Installed Plugins. Then click on Deactivate next to the plugins that you suspect may have caused the issue. After that, try checking your site again to see if that has cleared the 503 error.

      Of course, there’s a good chance that you might not be able to log in to your WordPress admin area because of the 503 error. If that’s the case, you’ll need to try an alternative method.

      What you’ll need to do is access your site via Secure File Transfer Protocol (SFTP). First, download and open an SFTP program such as FileZilla.

      Filezilla

      Next, connect to your WordPress site using your hosting service’s login information:

      FileZilla FTP Connection

      Then, click on the wp-content directory, and find the plugins folder.

      FileZilla

      Rather than outright deleting the plugins, it is suggested that you try renaming the directory itself. Finally, refresh your site to see if doing all of this has made a difference.

      If removing or renaming your plugins doesn’t change anything, they probably aren’t what is causing this issue. You will need to activate your plugins through the WordPress admin page or by renaming the directory back to ‘plugins’ in your SFTP client.

      It is important to note that regardless of the outcome of these tests, you should always take care when managing your plugins. Ideally, you should only have as many as you strictly need.

      Unfortunately, a large number of third-party themes will come with a number of plugins to support both their design and functionality. You should be mindful of this when choosing a new look for your site.

      Common culprits of the 503 Service Unavailable Error are high-resource plugins for security and malware protection. These tend to use a ton of resources because they are constantly scanning the files on your server. However, that doesn’t mean they aren’t important. On the contrary, they are often quite essential.

      2. Change Your Theme

      If you’re still experiencing issues with your site, your theme may be at fault, as it radically changes the way your site functions. Themes are often powerful enough to turn a plain blogging site into a full-blown news magazine.

      Since a theme can make such dramatic changes to how a website functions, it can also greatly increase the site’s resource consumption. To determine whether your theme is what’s causing the error, you can revert back to a default core WordPress theme, such as Twenty Twenty-Two.

      WordPress Twenty Twemty-Two theme

      WordPress releases a new default theme almost every year. These themes tend to be a stripped-down design that showcases current WordPress features. They also end up being less resource-intensive than most other themes.

      To change your theme to one of these options, navigate to the WordPress dashboard. Then go into Appearance > Themes to select and activate your preferred theme.

      If you no longer get the 503 error after completing this test, then you’ve discovered the problem. Third-party themes can consume too many resources because of custom code or recent updates that weren’t properly configured. You can resolve this issue by permanently switching your theme.

      As with plugins, you can also remove a WordPress theme through SFTP if you can’t access your dashboard. You will simply need to navigate to the /[domain]/wp-content/themes directory and delete the theme you want to remove. You can also rename the theme if you wish to save it for later.

      3. Reinstall WordPress

      If turning off your plugins and resetting your theme doesn’t work, you may need to reinstall WordPress. Typically, you will only need to resort to this option if a file in WordPress core has become modified (which it should never be) or corrupted.

      If this is the case, you don’t have to worry about losing your data. WordPress stores your uploaded files on the server, and the rest of your information is safely housed in your site’s database. Therefore, you can reinstall WordPress core files specifically to try and resolve your issue.

      Still, you may want to back up your files with your host before making any major changes. Every hosting service has its own backup tools. You’ll want to create a current backup or snapshot of your hosting account that you can restore later to ensure that you don’t lose any of your content or images.

      The easiest way to reinstall WordPress is through the dashboard. Go to WordPress > Dashboard > Updates. Then click on Re-install Version 5.9 (or whatever version happen to be running):

      WordPress 5.9 update

      WordPress will reinstall itself on its own. Once it’s done, refresh your site and see if that’s made a difference.

      If you can’t access your WordPress dashboard, you can also manually reinstall WordPress via SFTP. First, you’ll need to download WordPress directly from WordPress.org.

      WordPress.org

      Then, unpack the .zip file for WordPress.org. 

      Next, open FileZilla or another SFTP solution and make sure it’s connected to your WordPress site. Upload your freshly downloaded WordPress files to your WordPress directory.

      Your new WordPress files should completely replace everything in the old WordPress directory. In general, it’s a good idea to check your site’s performance after every major change.

      4. Upgrade Your Hosting Service

      Finally, if none of the previous steps worked, it may be time to accept that your site has outgrown your hosting plan’s capabilities. It might be time to look into managed WordPress hosting.

      WordPress hosting

      This may also be true if you find that a non-negotiable theme or plugin is causing the issue. With better hosting and more resources, you can still use the plugins and themes you initially wanted. Hopefully, you’ll also encounter fewer 503 errors moving forward.

      WordPress hosting can provide you with some of the following services:

      • Built-in caching. This means the server stores a snapshot of your website, so it doesn’t have to constantly serve dynamic content to your visitors. The better the caching is, the fewer resources your site should consume.
      • High-performance resources. The more powerful the server is, the more resources your site will have. A strong server will have fast processing, plenty of memory, and enough hard drive space for your site and its files.
      • WordPress-specific support. A hosting service made for WordPress will be tailored to and optimized for its unique needs.
      • Managed services. A managed hosting service will monitor many maintenance elements of your website for you, from backups to site speed tests. You may even get support to help you work through 503 Service Unavailable Errors.
      • WordPress migration. You’ll usually need to transfer your files and import your database to the new provider to switch hosts. Therefore, a web hosting service that provides hands-on support for WordPress migration is ideal.

      If you’re tired of receiving regular errors, upgrading your web hosting may be the answer to your problems. Additionally, you’ll be able to benefit from a whole suite of convenient features.

      Skip the line and get tips right in your inbox

      Click below to sign up for more how-to’s and tutorials just like this one, delivered to your inbox.

      marketing tips

      How to Fix Other Common WordPress Errors

      Want to learn how to fix other technical issues on your WordPress website? We’ve put together several guides to help you troubleshoot some of the most common WordPress errors:

      Check out our WordPress Tutorials section if you’re looking for tips and best practices for running a WordPress site. A collection of expert-written guides, it’s designed to help you navigate the WordPress dashboard like a pro.

      Error Resolved

      The 503 Service Unavailable Error can be frustrating to deal with, but troubleshooting it is pretty straightforward. This error occurs when your site consumes too many resources for the server to handle.

      If you encounter this problem, you can try the following strategies to fix it:

      1. Turn off your plugins.
      2. Change your theme.
      3. Reinstall WordPress.
      4. Upgrade your hosting account.

      Sometimes your WordPress site just needs more power. Our DreamPress Managed WordPress Hosting accounts have everything you need to launch a high-traffic website. Contact us today to learn more about our WordPress migration services and hosting plans.

      Get More with DreamPress

      DreamPress Plus and Pro users get access to Jetpack Professional (and 200+ premium themes) at no added cost!

      Managed WordPress Hosting - DreamPress



      Source link

      How to Fix the “Too Many Redirects” Error in WordPress (13 Methods)


      URL redirection is necessary when pages have changed their addresses permanently or temporarily. However, sometimes your website can get stuck in a redirection loop. If this happens, you may face the “too many redirects” error that prevents you from accessing web pages.

      Fortunately, you can use several methods to fix this redirection issue. The problem usually lies within your website, browser, server, or third-party plugins or programs. By taking the time to diagnose the cause of the error, you can solve it relatively quickly.

      In this article, we’ll look at common causes of the “too many redirects” error in WordPress and how to fix them. We’ll also explain how to prevent the problem from happening again in the future. Let’s get started!

      What Causes the “Too Many Redirects” Error in WordPress

      The “too many redirects” error happens when your WordPress website gets stuck in redirection loops. For example, it may try to send you to another URL that points to an entirely different link. If this process continues, your browser may trigger the error and fail to load the site.

      This error looks different depending on the browser you use. For example, in Google Chrome, it usually displays as “ERR_TOO_MANY_REDIRECTS” or “This webpage has a redirect loop.”

      The “too many redirects” error in Google Chrome. 

      If you use Mozilla Firefox, the error usually reads as “The page isn’t redirecting properly.” Alternatively, it displays as “This page isn’t working right now” in Microsoft Edge. Finally, Safari users may encounter “Safari Can’t Open the Page.”

      Unlike some other common WordPress errors, the “too many redirects” issue doesn’t usually solve itself. As such, you’ll need to troubleshoot the origins of the problem to fix it.

      Skip the Stress

      Avoid troubleshooting when you sign up for DreamPress. Our friendly WordPress experts are available 24/7 to help solve website problems — big or small.

      How to Fix the “Too Many Redirects” Error in WordPress (13 Methods)

      Various factors can cause the  “too many redirects” error in WordPress. Therefore, you may need to try a few different methods to solve it. Let’s take a look at a comprehensive list of all the possible solutions.

      1. Force the Page to Refresh

      The first solution is a very simple one. You can force your browser to refresh and retrieve a new version of the page. This method overrides any stored data and displays the latest information available for the WordPress website.

      You might like to try this method first because it’s quick and won’t interfere with any other strategies. You’ll also know straight away if it has fixed the problem or not.

      You can use the following keyboard shortcuts to force a refresh in your browser:

      • Google Chrome (Windows): Ctrl + F5
      • Google Chrome (Mac): Command + Shift + R
      • Safari: Command + Option + R
      • Firefox (Windows): Ctrl + F5
      • Firefox (Mac): Command + Shift + R
      • Microsoft Edge: Ctrl + F5

      That’s all you need to do. However, if this simple method doesn’t work, you can continue through the troubleshooting guide.

      2. Delete Cookies on the Site

      Cookies are small blocks of data that enable websites to remember information about your visit. Then, the sites use that data to customize your experiences.

      For example, an e-commerce platform might send you on-site recommendations based on your previous purchases and searches. This way, you’ll be able to save time when looking for related products.

      However, cookies can sometimes hold onto incorrect data. In turn, this can cause the “too many redirects” error. As such, you can try deleting cookies from the WordPress site.

      In Google Chrome, navigate to the three dots at the top of your menu. Then, click on Settings.

      How to access the Settings in Google Chrome.

      Scroll down to Privacy and security and select Cookies and other site data.

      Finding cookies and other site data in Google Chrome.

      Move down the page and select See all cookies and site data. This will open a list of all the cookies that different sites hold with your data.

      A list of the cookies in a Google Chrome browser.

      Scroll down to find the site that is throwing the “too many redirects” error. Then, click on the trashcan icon next to its corresponding cookie to delete it.

      There is a slightly different method if you’re using Safari, Microsoft Edge, or Firefox. Once you’re done, try refreshing the WordPress site to see if the error is fixed.

      3. Clear Your WordPress Site or Server Cache

      Caching stores information about your site so that it can load faster the next time you access it. However, your cache may be holding outdated data and causing a redirection error. Therefore, you can try clearing out the stored information to see if it fixes the problem.

      If you can access your WordPress site, you can try clearing the cache with a dedicated caching plugin. For example, you could use WP Super Cache.

      The WP Super Cache plugin. 

      However, the redirection error will likely prevent you from getting to your dashboard. Therefore, you might need to try clearing your server cache.

      If you’re a DreamPress customer and have a shell account, you’ll need to log into your domain with Secure Shell (SSH) protocol. Then, you can enter the following code to purge your cache:

      curl -X PURGE “http://yourwebsite.com/.*” ; wp cache flush

      Alternatively, you can use the following command if you don’t use the WP Super Cache plugin:

      wp vanish purge --wildcard

      Once you’ve cleared out the cache, try reloading your site. If that doesn’t work, you may need to try another method.

      4. Clear Your Browser Cache

      Your browser also stores cached information about the websites you visit, including your own. If your browser is holding onto outdated data, you may need to clear it out to fix the redirection error in WordPress.

      If you’re working with Chrome, you can head back to Settings and scroll down to Privacy and security. Here, click on Clear browsing data.

      Clear browsing data in Google Chrome.

      This will bring up a new window that enables you to choose the data you want to delete. Select each item by checking the box next to it and then click on Clear data.

      Clearing data in Google Chrome.

      You’ll need to use slightly different methods if you’re working with a different browser. When you’re done, try reloading your site to see if the “too many redirects” error has gone.

      5. Determine the Cause of the Redirect Loop

      If the earlier methods didn’t solve the redirection error, you might like to try to diagnose the problem. Otherwise, you might spend a lot of effort on more time-consuming strategies that may not fix the error.

      There are a couple of different methods that can determine the cause of redirect loops. Firstly, you can enter your site’s URL into the Redirect Checker tool.

      The Redirect Checker tool from httpstatus. 

      This free online application enables you to enter multiple URLs and check their statuses. You can also specify the user agent, such as your browser, search engine bots, and mobile devices.

      Once you enter your URL, you’ll be able to see any status or error codes associated with your site at the bottom of the page.

      Status codes associated with the DreamHost URL. 

      Alternatively, some browser add-ons can show you the nature of redirects on different sites. For example, the Redirect Path Chrome extension flags redirect error messages in real-time.

      The Redirect Path Chrome extension.

      However, these tools might not always tell you why your redirect error is happening. If this is the case, you can continue with the other strategies in this troubleshooting guide.

      6. Temporarily Disable Your WordPress Plugins

      WordPress plugins are helpful tools that can introduce new functionalities to your website. However, these add-ons can also cause many issues, such as the “too many redirects” error.

      Anyone can develop and share WordPress plugins. As such, you may accidentally download one that contains faulty code. These add-ons also have frequent updates. If you haven’t updated your plugins, they may also be causing problems on your site.

      You may like to try this method if you recently added new plugins to your WordPress site. If so, you’ll probably have a good idea of the one causing the problem. Even if you don’t suspect a particular plugin, you can use the following steps to address the issue.

      If you can’t access your WordPress site, you’ll need to access the plugin files via a Secure File Transfer Protocol (SFTP) application such as WinSCP.

      The WinSCP SFTP client.

      Once you’ve connected the SFTP client to your site, you’ll need to find the folder that holds your plugins. You’ll usually find it under wp-content > plugins. Here, you’ll see a series of folders with the names of your installed plugins.

      Plugin folders for WordPress sites.

      Rename the plugins folder to “plugins-off”. This will deactivate all of your plugins. You should now be able to access your WordPress dashboard.

      Next, rename your plugins folder to its original title. Then go through the process of reactivating each add-on from your WordPress dashboard to see which one throws the “too many redirects” error.

      If you find a problem plugin, you’ll need to keep it deactivated. You’ll also need to find an alternative option for your website.

      7. Check Your WordPress Site Settings

      Sometimes an error in your WordPress site settings can cause redirect loops. For example, your website might be pointing to the wrong domain name for your site files. This more commonly happens if you’ve recently migrated your website.

      You can check your site settings in your WordPress dashboard. If you can access it, log in and head to Settings > General. You’ll then see two fields for WordPress Address (URL) and Site Address (URL).

      Accessing URL settings in WordPress.

      These two addresses should be identical unless you want WordPress to have its own directory. If the URLs don’t match, and they should, you can change the settings manually. You’ll need to edit your site’s wp-config.php file.

      Access your website using SFTP as you did previously. Then, locate and open the wp-config.php file in a text editor.

      Next, you’re going to paste the following code into the file:

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

      Replace the example URLs with the correct ones and save the file. Then reload your website and see if this solved the problem.

      8. Check Your SSL Certificate

      If you’ve recently migrated your site to HTTPS, there are various steps you need to complete. Unfortunately, if you miss some of them or misconfigure some settings, you could trigger the “too many redirects” error in WordPress.

      For example, if you didn’t install your Secure Sockets Layer (SSL) certificate correctly, it could be causing problems. If you didn’t add it at all, your site would automatically get stuck in a redirect loop.

      However, there might also be some minor issues with your SSL certificate installation. For example, you might have incorrectly installed the intermediate certificates that work together with your main one.

      You can check if your SSL certificate is correctly installed using a tool such as the Qualys SSL Server Test.

      The SSL Server Test from Qualys.

      This application scans your domain to find any associated SSL issues. This process can take a few minutes, but it will alert you to any problems with your certificate installation.

      9. Update Your Hard-Coded Links

      If you’ve just switched from HTTP to HTTPS, you’ll need to redirect your links. Otherwise, these URLs will point to locations that no longer exist on your website.

      Many users utilize plugins that can change these links automatically. For example, you could use Better Find and Replace.

      The Better Find and Replace plugin.

      However, it can be risky to use an add-on. If your chosen plugin has any issues with its code or updates, it can misconfigure your redirects and trigger the “too many redirects” error.

      As such, we recommend that you manually update your hard-coded links. You can do this with the search and replace method in WordPress.

      We have a complete guide on how to change your WordPress URLs. If you’re a DreamHost customer, you can also reach out to our technical support team for assistance.

      10. Check for HTTPS Redirects on Your Server

      HTTPS redirect server rules can also cause the “too many redirects” error in WordPress. These settings may have been misconfigured when you migrated your site.

      For example, the settings may not be correctly redirecting your links to HTTPS. As such, you’ll need to amend them.

      If your host uses an Apache server, you’ll need to edit your .htaccess file. Locate it within your SFTP client and open the file in a text editor. Then, you can enter the following code:

      RewriteEngine On
      
      RewriteCond %{HTTPS} off
      
      RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

      This code will cause all HTTP links to redirect to HTTPS automatically. Save the .htaccess file and try to reload your WordPress site. If it still triggers the redirect error, you’ll need to try another solution.

      Alternatively, you can adjust your HTTPS redirects on Nginx servers. If you’re not sure which server type your host uses, you might like to double-check with the company first.

      In Nginx, you’ll need to adjust the config file. Open it with your SFTP client as usual, and then locate the file. Insert the following code to set up your redirects:

      server { listen 80; server_name domain.com www.domain.com; return 301 https://domain.com$request_uri; }

      Save the file and reload your WordPress site. If it doesn’t fix the problem, keep moving through this troubleshooting guide.

      11. Check Your Third-Party Service Settings

      Suppose you use a third-party service such as a Content Delivery Network (CDN). In that case, its settings may cause the “too many redirects” error. For example, Cloudflare is a popular option that can improve your website’s performance and security.

      The Cloudflare Content Delivery Network (CDN).

      Cloudflare can trigger the “too many redirects” error if you have the Flexible SSL setting enabled and an SSL certificate from another source (such as your hosting provider).

      In this scenario, your hosting server requests are already redirecting URLs from HTTP to HTTPS. However, with the Flexible SSL setting, all server requests are being sent in HTTP. As such, there are redirection loops happening between the different processes.

      As such, we don’t recommend using the Flexible SSL setting if you have an SSL certificate from a third-party source. Instead, change your Cloudflare Crypto settings and choose either Full or Full (strict). Doing so will automatically send requests in HTTPS.

      Additionally, you may like to enable the Always Use HTTPS rule in Cloudflare. This forces your site to send all requests in HTTPS. Therefore, it avoids causing a redirect loop and triggering the WordPress error.

      Finally, you might like to double-check that you’ve correctly configured your redirects in Cloudflare. For example, you’ll want to ensure that your domain doesn’t redirect to itself. Otherwise, it can trigger a redirect error.

      12. Check Redirects on Your Server

      We already covered how to check for HTTPS redirects on your server. However, other redirects can trigger an error when loading your WordPress website.

      For example, you might have a 301 redirect misconfigured. It might be pointing to the original link, triggering a redirect loop that prevents your site from loading. You can usually find redirects such as this one by checking your config files.

      If your host uses an Apache server, you may have issues with your .htaccess file. We recommend creating a new one with default settings.

      First, you’ll need to access your site via SFTP. Find the .htaccess file and save a copy of it in case you make a mistake. You can do this by renaming it to something like “.htaccess_old”.

      Next, you’ll need to make a new .htaccess file. Put the following code into it to establish default settings:

      # BEGIN WordPress
      
      RewriteEngine On
      
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
      
      RewriteBase /
      
      RewriteRule ^index.php$ - [L]
      
      RewriteCond %{REQUEST_FILENAME} !-f
      
      RewriteCond %{REQUEST_FILENAME} !-d
      
      RewriteRule . /index.php [L]
      
      # END WordPress

      Save the file and try reloading your WordPress site. If this process worked, you can delete the old .htaccess file and keep working with the new one.

      However, if your host uses an Nginx server, you’ll need to follow a slightly different process. This server type uses a variety of different config files, depending on the hosting provider. We recommend reaching out to your host to see which one applies to your situation.

      13. Contact Your Web Hosting Provider

      If you’ve tried all of these methods and you can’t fix the “too many redirects” error, it might be time to get some help. You might be missing a crucial step, or there could be a deeper issue with your WordPress site.

      By contacting your web hosting provider, you can get fast assistance with the error. For example, DreamHost customers can contact our technical support team.

      The DreamHost technical support landing page.

      You’ll need to log in to your account. You may also need to provide some information, such as your domain name and customer details.

      How to Prevent the “Too Many Redirects” Error in the Future (3 Methods)

      If you want to prevent the “too many redirects” error, there are a few steps you can take within your browser and site. Let’s take a look at a few different methods.

      1. Keep Your Plugins and WordPress Files Up to Date

      Outdated or faulty plugins are some of the leading causes of the “too many redirects” error. We already covered how you can deactivate any add-ons that may be triggering the issue. However, you can also take preventative steps with your current plugins and theme files.

      For example, you should update your plugins and WordPress theme frequently. You can tell if the software has a new release because you’ll see an alert in your WordPress dashboard. You can also navigate to Plugins > Installed Plugins.

      Updating plugins in WordPress.

      You can update any plugin by clicking on update now or Enable auto-updates. However, if you prefer to do the process manually, we recommend checking this page on a regular basis. Doing so will enable you to stay on top of any new releases and bug fixes.

      Additionally, you can report any faulty plugins if they cause the “too many redirects” error. Find the corresponding plugin support forum and document your issue to see if there is a known solution. Moreover, this action could prompt the plugin developers to fix the problem.

      2. Clear Out Your Cache and Stored Cookies Regularly

      Earlier in the guide, we explained how to clear out your cache and your saved cookies. These methods prevent your browser or WordPress site from trying to access outdated data.

      It’s likely that you won’t need to use these methods as most browsers are smart enough to remove outdated cookies and cache items. However, you can streamline the process by using a WordPress plugin to clear your site’s cache. An add-on such as this one can make sure that the most current version of your site is always available to your users.

      For example, if you’re using WP Super Cache, you can set up automatic processes. In your WordPress dashboard, navigate to Settings > WP Super Cache.

      Configuring settings in WP Super Cache. 

      If you want to remove cached files manually, you can click on Delete Cache. You can also navigate to the Advanced tab and scroll down to Expiry Time & Garbage Collection. Here, you can control how long cached files remain active on your site.

      Configuring the WP Super Cache settings.

      Here you can choose a custom cache timeout duration in seconds. Alternatively, you can select a custom time and interval to scan your site for outdated cache files. You can even elect to receive emails when this process happens.

      You likely won’t be able to access the plugin if you’re already receiving the “too many redirects” error. However, using this add-on can be a sound preventative measure.

      3. Use a Checklist or Company for Website Migrations

      Many of the causes for redirect errors in WordPress arise from migrations from HTTP to HTTPS. If you’re not familiar with migrating a site, you may miss some of the essential processes needed to make your website redirect and function correctly.

      Therefore, we recommend using a dedicated migration service to take care of the process. Professionals have experience with every aspect of migrating a site. As such, they’re less likely to make mistakes.

      If you prefer to do the migration yourself, you might like to use a checklist during the process:

      1. Prepare for the migration. First, you’ll need to make a copy of your site as a backup. You’ll also need to block access to your new site until you can check it for errors and migrate all your content.
      2. Create a URL mapping. You’ll need to create a redirect map for all your site’s URLs. Then, you’ll need to update them and create sitemaps so that you can transition the links easily.
      3. Create backups. Before starting the migration, you’ll probably want to back up all your individual content. Otherwise, you could lose it if something goes wrong during the process.
      4. Update your DNS settings. You’ll need to change your domain settings so that the URL points to your new address. Usually, your new host can take care of this for you.
      5. Set up your redirects. This step is crucial because misconfiguring your redirects can trigger the “too many redirects” error. Make sure you test each link to see that it works.
      6. Send your URLs to Google Search Console. You’ll need to verify your new site and send sitemaps with your new URLs indexed. This process is essential for Search Engine Optimization (SEO).
      7. Update your links. If other websites link to your site, you might like to ask them to update those URLs. Additionally, you should ensure that any ad campaigns contain the correct links for your new website address.
      8. Check for problems. Finally, you might like to run a site audit. This process can test all your links and identify any issues.

      If you’re migrating to a different server, the process might be slightly different. It pays to do your research before the migration to avoid any errors.

      Have Another Error Message to Fix?

      If you need to resolve other technical problems on your site, we’ve put together several comprehensive tutorials to help you troubleshoot every common WordPress error:

      And if you’re looking for more information and best practices for running a WordPress site, check out our WordPress Tutorials section. This is a collection of expert-written guides designed to help you navigate the admin dashboard like a pro.

      Take Your WordPress Website to the Next Level

      Whether you need help logging into the WordPress admin area, fixing a redirect issue, or finding the plugins folder, we can help! Subscribe to our monthly digest so you never miss an article.

      No More Redirect Loop Error

      The “too many redirects” error can happen in WordPress when the site gets stuck in a redirection loop. Although the problem can be frustrating, you should be able to solve it pretty quickly.

      You can usually fix the error by clearing out your cache or cookies. Additionally, there may be solvable issues with your server, third-party platforms, or plugins. Finally, if you still can’t troubleshoot the redirection error, your hosting provider may be able to help you out.

      Are you looking for a WordPress hosting provider that can help you with redirection issues and other common errors? Check out our DreamHost packages today! We provide personalized technical support to assist you with any WordPress problems.

      Image source: Flickr



      Source link