Errors & Troubleshooting Archives - Website Guides, Tips & Knowledge DreamHost Thu, 06 Jun 2024 20:18:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.4 How To Fix Common SSL Issues In WordPress https://www.dreamhost.com/blog/how-to-fix-common-ssl-issues-wordpress/ Fri, 26 Apr 2024 08:00:00 +0000 https://dhblog.dream.press/blog/?p=32347 Seeing SSL issues in WordPress? This guide helps you resolve the most common errors & secure your site.

The post How To Fix Common SSL Issues In WordPress appeared first on Website Guides, Tips & Knowledge.

]]>
Installing a Secure Sockets Layer (SSL) certificate on your WordPress website is like employing a bouncer to keep out any unwanted guests. It’s a smart move. But just occasionally you might encounter some problems with your door staff. These hiccups are known as SSL issues.

Obviously, no one wants security problems on their site. But the good news is that most SSL errors have simple fixes.  All it takes is a little troubleshooting to get your site back to full working order.

In this post, we’re going to take a closer look at how to install SSL certificates on your WordPress website and fix any problems that arise. Ready to get started? Let’s go!

What Is SSL/TLS Exactly?

DreamHost Glossary

SSL/TLS

SSL stands for secure sockets layer. SSL is a protocol for maintaining a secure connection and protecting sensitive data to keep internet users safe during online transactions, login sequences, and more. Transport layer security (TLS) is the successor to SSL that’s in place today and handles vulnerabilities even more effectively.

Read More

SSL, or Secure Sockets Layer, is the secret handshake of the internet. It’s a system that protects all data traveling between your web browser and a website using encryption. This prevents anyone from eavesdropping on your connection.

TLS (Transport Layer Security) is the new replacement for SSL. It performs the same role using similar technology but with improved security.

SSL/TLS works in conjunction with Hypertext Transfer Protocol Secure (HTTPS) — the updated, secure version of HTTP. Since it’s encrypted, HTTPS increases the security of any information that is transferred.

DreamHost Glossary

HTTPS

HTTPS is a secure version of HTTP. With HTTPS, data sent between browsers and websites is encrypted with the TLS/SSL protocols. That means data can’t be modified or read during transfer.

Read More

We still usually talk about “SSL issues” and “SSL certificates” because these terms are familiar, but it’s worth remembering that TLS has largely replaced the SSL protocol — Most modern browsers only support the latter.

Even so, SSL and TLS are used interchangeably when talking about secure connections.

What Is An SSL/TLS Certificate?

Before your web browser sends any data, it needs to verify the identity of the hosting web server. An SSL/TLS certificate works like an ID card, providing proof that the server is legitimate.

On a technical level, an SSL/TLS certificate is more like an encryption key. Without an up-to-date certificate, it’s impossible for any browser to connect to your website securely.

Why You Should Be Using SSL/TLS

Installing an SSL/TLS certificate on your WordPress site is important for several reasons.

First and foremost, it enables your hosting server to establish a secure connection with web browsers. This helps to prevent security breaches that may compromise both your personal information and your customer data.

For this reason, Google now penalizes sites that don’t have an SSL/TLS certificate. For example, it might display a “not secure” or “your connection is not private” warning message to users who try to access the site.

Your connection is not private error as shows on Chrome

The exact wording of the message may vary depending on the browser you’re using, but the concept is the same.

Ultimately, this can hurt your engagement and hamper your SEO (search engine optimization) rankings. So, it’s another good reason to secure your site.

It’s also worth noting that certain types of websites really need an SSL certificate to work effectively. For instance, if you want to start an online store, you’ll need SSL/TLS encryption to accept online payments via gateways such as Stripe, PayPal, and Authorize.net.

How To Fix Common SSL Issues In WordPress (5 Key Solutions)

Now that we understand a little more about what SSL/TLS is, let’s get into the unexpected issues that can come from it.

Below are five of the most common SSL problems in WordPress, and how to resolve each of them.

1. The NET::ERR_CERT_INVALID Error

If you’re a Google Chrome user, one of the most common issues you might run into is an error message that reads “NET::ERR_CERT_INVALID.” This can happen in other browsers, too, although the message may differ slightly.

The same "Your connection is not private" screen calling out where to find the "NET::ERR_CERT_INVALID" note

In both cases, this error means that the connection to the site is not secure. More specifically, it indicates that the certificate authority that signed your SSL certificate isn’t on your browser’s list of trustworthy providers.

Unless you acquired your SSL certificate from a shady source, it’s more likely that something is wrong with the settings or configuration.

When this happens, there are a few steps you can take. First, you’ll want to clear your browser cache. If that doesn’t do the trick, disable your antivirus software (this can interfere with SSL).

If local solutions don’t work, check that your SSL certificate is assigned to the correct domain or subdomain, and that it hasn’t expired.

You can do this by clicking on the small site information button or padlock icon to the left of the browser address bar. Details of the certificate will appear, and you’ll want to make sure it says “valid.” If it says “not valid,” you’ll need to renew it as soon as possible through the issuing provider, also listed here.

screenshot showing the "view site information" icon to the immediate right of the browser URL

If you installed the certificate yourself, you could try reinstalling it. However, you may want to use a different certificate provider this time, as your browser might not recognize the issuing authority of your current certificate. We recommend using Let’s Encrypt.

Let's Encrypt screenshot of the homepage

If the certificate is assigned to the correct domain and is up to date, you may need to contact your hosting provider. They should know what steps to take to resolve the issue.

2. Mixed Content Errors

Another common type of error you can encounter when moving to SSL is mixed content warnings.

In a nutshell, this is what happens when images, scripts, or stylesheets on your site load while using the old, insecure HTTP protocol. In other words, some of your WordPress content is secure, while other parts aren’t. Embedded YouTube videos are commonly at fault here.

There are two methods you can use to fix mixed content issues. The first is to use a plugin such as Really Simple SSL.

screenshot of the Really Simple SSL found on wordpress.org  with download and preview buttons

When you install and activate the tool on your WordPress site, the plugin will offer you the option to activate SSL and fix mixed content issues right away. If you want to make any adjustments, you can visit the plugin via Settings > SSL & Security.

really simple SSL & security as seen through the WordPress access

If you don’t want to use an automated plugin, the alternative option is the manual method. To get started here, navigate to Settings > General in WordPress.

Under WordPress Address (URL) and Site Address (URL), check to make sure that the URLs are using “https.”

General settings menu showing the wordpress address URL and site address URL calling out the "s" in "https"

After you save your changes, you can install the Better Search Replace plugin.

screenshot of the better search replace download option in WP

With this tool, you can easily search for, find, and replace old URLs within your WordPress database. Once you have activated it, navigate to Tools > Better Search Replace.

screenshot of the BSR plugin at work in WP listening select tables immediately blow the search for and replace fields

In the Search for field, you can add your website URL with “http” at the beginning. Then, add “https” to the Replace with field.

When you’re done, save your changes. Now the mixed content errors should be gone when you refresh your site.

Note: Remember to back up your website, since this can affect your databases.

3. Too Many Redirects

Some SSL issues are caused by the too many redirects error. This can happen if you ask WordPress to enforce SSL/HTTPS for the admin area of your site.

To resolve this problem, you’ll need to edit your wp-config.php file. You can locate this file by using a Secure File Transfer Protocol (SFTP) client like FileZilla or the file manager in your web hosting account.

To access your site’s directory, open the folder labeled with your domain name. Inside it, you’ll find the wp-config.php file.

If you’re using FileZilla, the first step is to connect to your WordPress site. If this is your first time using the FTP client, you’ll need to obtain your credentials from your web host. Once connected, locate the wp-config.php file in your site’s directory.

file manager showing wp-config.php with right click options and view/edit highlighted

Open the file and insert the following lines of code:

define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
       $_SERVER['HTTPS']='on';

Make sure to add this at the bottom of the file, right before the line that reads, “That’s all. Stop editing! Happy blogging.” When you’re finished, save your changes and close the file.

4. HTTP To HTTPS Redirect

WordPress won’t automatically redirect your site from HTTP to HTTPS — you need to tell it to. Without creating these instructions, visitors could see SSL errors.

Since WordPress 5.7, it is possible to migrate to HTTPS with one click by following the instructions in the Site Health section of your WordPress dashboard. Go to Tools, select Site Health, and click the button to update your site to HTTPS.

If that option doesn’t work for your website, use a plugin such as Really Simple SSL — or you can manually configure the HTTP to HTTPS redirect by editing your .htaccess file. Again, you can do this via SFTP or the file manager in your hosting account. You will find it inside the folder that shares your domain name.

DreamHost Glossary

.htaccess

’.htaccess’ is a configuration file used by the Apache web server software. The .htaccess file contains directives (instructions) that tell Apache how to behave for a particular website or directory.

Read More
Locate and open the .htaccess file, then add in the following code:

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

Remember to save your changes when you’re done. If you’re not comfortable editing your site’s files, we recommend using a plugin or contacting your hosting provider for assistance.

5. A Name Mismatch Error

The name mismatch error occurs when your domain name listed in the SSL certificate does not match the browser URL. This normally happens when you purchase a certificate from a third-party seller.To fix this error, you’ll simply need to add the following code to your .htaccess file:

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

Finish by saving your changes. When you revisit your WordPress site, you should no longer see any SSL error messages.

How To Fix Other Common WordPress Errors

Need to resolve other technical issues on your site? 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. This is a collection of expert-written guides designed to help you navigate the WordPress dashboard like a pro.

SSL/TLS Error FAQs

Still have questions about SSL and TLS? You’ve come to the right place. Here are some of the most commonly asked questions, and the matching answers:

Do I need SSL for WordPress?

Technically no. But a website without SSL/TLS today is going to be flagged up with security warnings in every browser, and marked down severely by every search engine.

If your site handles any sensitive information, such as credit card details, going without SSL is just asking for trouble.

How do I manually install an SSL certificate on WordPress?

First, you need to buy and download your SSL certificate files. Then you need to generate a Certificate Signing Request (CSR) on your web server, activate and install your certificate, and update WordPress to use HTTPS.

Doing this all manually is a complex process, so we have dedicated SSL guides to help.

Why am I getting SSL error for every website?

It could be one of several reasons:

  • Time and date settings: SSL certificates are sensitive to time. If your computer is set to the wrong time or date, it could invalidate the connection.
  • Browser cache issues: Corrupted data in your browser cache can sometimes disrupt SSL/TLS verification.
  • Software updates: Occasionally, bad updates can cause SSL/TLS errors.
  • Antivirus software: These apps can interfere with SSL/TLS.
  • Network proxies: You might start seeing SSL/TLS issues on every site if you’re using a misconfigured VPN.

Making WordPress Secure

Adding an SSL certificate to your WordPress website is really important if you want to maintain security and appear in search results. Normally, it’s a pretty straightforward process. But as we have discovered in this post, hiccups can happen.

To recap the most common errors and their resolutions:

  • The NET::ERR_CERT_INVALID error suggests that your certificate needs to be renewed or reinstalled.
  • Mixed content errors can be fixed manually, or with a plugin such as Really Simple SSL.
  • Too many redirects can be resolved by adding code to your wp-config.php file.
  • A WordPress HTTP to HTTPS redirect needs to be configured using a plugin such as Really Simple SSL, or manually via your site’s .htaccess file.
  • A name mismatch error happens when the certificate domain and browser URL do not match; you’ll need to add code to your .htaccess file.

Setting up SSL on your WordPress website is free and easy with DreamHost.

All our plans include an SSL certificate from Let’s Encrypt, and our support team is on hand 24/7 to guide you through the process.

Check out our DreamPress plans today to learn more. They come with the TLS certificate pre-installed for you!

Get Content Delivered Straight to Your Inbox

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

The post How To Fix Common SSL Issues In WordPress appeared first on Website Guides, Tips & Knowledge.

]]>
How To Fix “Briefly Unavailable For Scheduled Maintenance” Error In WordPress https://www.dreamhost.com/blog/briefly-unavailable-for-scheduled-maintenance/ Fri, 22 Mar 2024 14:00:28 +0000 https://dhblog.dream.press/blog/?p=43626 It’s been five minutes, and you still see “Briefly unavailable for scheduled maintenance. Check back in a minute” on the screen instead of your website. That means your website has encountered a maintenance mode error and is currently stuck there. Thus, neither you nor your site visitors can access the website right now. But don’t […]

The post How To Fix “Briefly Unavailable For Scheduled Maintenance” Error In WordPress appeared first on Website Guides, Tips & Knowledge.

]]>
It’s been five minutes, and you still see “Briefly unavailable for scheduled maintenance. Check back in a minute” on the screen instead of your website.

That means your website has encountered a maintenance mode error and is currently stuck there. Thus, neither you nor your site visitors can access the website right now.

But don’t worry! It’s just a daily WordPress thing. You can recover your site without engaging in massive technical work storms.

In this article, we’ll look at the leading causes of the WordPress maintenance mode error, show you how to fix this, and share some tips to help you avoid the same problem in the future.

Let’s get started!

What Is The “Briefly Unavailable For Scheduled Maintenance. Check Back In A Minute” Error?

screenshot of the Briefly unavailable for scheduled maintenance. Check back in a minute. error

The “Briefly unavailable for scheduled maintenance. Check back in a minute” message is a standard WordPress notification that tells you the site has entered maintenance mode.

WordPress includes this mode to allow for smooth updates and changes to the core software, plugins, and themes without affecting the user experience or risking data loss.

That said, when the “Briefly unavailable for scheduled maintenance. Check back in a minute” notification appears and remains on your screen, it usually means something from the core update or maintenance went wrong in the background and has made the site temporarily unavailable.

If reloading the page doesn’t solve the issue, you’ll have to solve it manually. After all, visitors won’t be able to access the page that displays the error until you fix the problem.

Also, sometimes, you may encounter a different notification: “This website is undergoing scheduled maintenance.”

The website is undergoing scheduled maintenance. Sorry for the inconvenience. Come back later, we will be ready soon!

Although similar to the error message, it’s not the same. It’s a generic notification used on websites across different platforms, so make sure you don’t mix them up.

What Causes The “Briefly Unavailable For Scheduled Maintenance” Error On WordPress?

When WordPress performs an update, it enters maintenance mode. During this time, a temporary .maintenance file is created in the site’s root directory, which informs you and website visitors the site is undergoing essential updates and will return soon.

wordpress dashboard showing the location The update process is starting. This process may take a while on some hosts, so please be patient.

That in itself won’t break your website. It’s just a safety measure WordPress sets while replacing or modifying the core files in the root folder when it updates. If performed live, these operations could break your site’s functionality.

WordPress sites usually stay in maintenance mode for a few seconds to a few minutes (it’s barely noticeable!). After applying the updates, WordPress deletes the .maintenance file, removes the site from maintenance mode, and restores regular user access.

So far, everything is working as intended. Nothing unusual.

However, unexpected errors, such as file system errors, server timeouts, internet issues, update permission issues, or plugin/theme conflict errors, can interrupt the update process.

And that’s where problems begin. Incomplete updates impact the root folder, making WordPress fail to delete the .maintenance file. Thus leaving your website forever stuck in maintenance mode.

Before we take a closer look at how to fix the error below, here’s a rundown of the most common factors that cause websites to stay in maintenance mode:

  • Closing the browser window during an update.
  • Updating several plugins at the same time.
  • The update script timing out due to a slow hosting server response or a low memory problem.
  • Internet connection drops during the update process, interrupting or prolonging the update.

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 Fix “Briefly Unavailable For Scheduled Maintenance. Check Back In A Minute”

There are several methods for manually resolving this maintenance error. Just proceed cautiously; it requires server access, which may raise security concerns.

You can solve this issue by logging into your web hosting account or connecting to your site using a Secure File Transfer Protocol (SFTP) client such as FileZilla.

DreamHost Glossary

SFTP

Secure File Transfer Protocol (SFTP) is a safer version of the FTP protocol that uses a secure shell data stream.

Read More

With that out of the way, here are the two most commonly used methods to resolve the “Briefly unavailable for scheduled maintenance” issue in WordPress:

Use The Panel

You may be able to fix this error by using the DreamHost custom built panel or a plugin, like cPanel, to remove the .maintenance file from the root directory.

WordPress creates this file during updates to signal maintenance mode. A failed update that strikes the script execution time or permission can’t automatically delete the file, and your site will remain unavailable until then.

There, you must become a surgeon with a knife and perform this minor surgery in order to revive your website.

Welcome onboard, Dr. Strange!

Access your web hosting account and log in to DreamHost or cPanel. Your hosting provider usually provides the login details and URL for cPanel.

Once you’re in the dashboard, look for the File Manager icon and click on it.

DreamHost Glossary

File Manager

A file manager is a software application that enables users to manage their files. It typically provides a Graphical User Interface (GUI) where people can browse through their files, open them, edit them, and save them.

Read More

Navigate to the public_html file in the root directory of your WordPress installation. If you’ve installed WordPress in a subdirectory or a subdomain, navigate to the appropriate folder.

Inside the root directory, look for the file named .maintenance. Once you find the .maintenance file, select it and delete it.

Settings dropdown of the .maintenance file showing "Delete" towards the bottom.

It’s the file containing the disrupted update option; deleting it will restore your website to its normal state.

Nerd Note: If you ever want to manually enable maintenance mode without using plugins, just place a .maintenance file in the root directory, like the one you just deleted.

Use File Transfer Protocol (FTP)

You can also resolve this issue by using the File Transfer Protocol (FTP), a method accessible and effective for users at all technical levels.

DreamHost Glossary

FTP

File Transfer Protocol (FTP) is a connection that you can use to transfer files over Transmission Control Protocol (TCP)/Internet Protocol (IP). You can use FTP to connect to a server you own and interact with its files.

Read More

First, you’ll need to install an FTP client, such as FileZilla, to access your website’s files on the server. Then, connect to your site using the FTP credentials provided by your hosting service.

FileZilla client with the "Host," "Username," and "Password" fields filled out to establish an FTP with a website.

These credentials typically include a hostname (often your website’s URL), a username, and a password.

Once connected, navigate to the root directory of your WordPress site. This is usually titled public_html, or the name of your website.

FileZilla client with the "Host," "Username," and "Password" fields filled out to establish an FTP with a website.

Your WordPress core files reside in the root directory, including wp-config.php, an easy reference to confirm you’re in the correct location.

Then, look for the .maintenance file in the root directory.

Dropdown menu after right-clicking the .maintenance file with the cursor highlighting "Delete" towards the bottom.

Right-click the .maintenance file and select Delete from the context menu. This action removes the file from your server, effectively removing your site from maintenance mode.

To see the file immediately, you must ensure your FTP client is set to show the hidden files in the folder. You can do this in FileZilla by clicking Server in the menu and selecting Force showing hidden files.

FileZilla's dropdown menu after clicking "Server" with the "Force showing hidden files" option enabled.

Still Getting The “Briefly Unavailable for Scheduled Maintenance” Error After Deleting The .maintenance File?

If you’re still stuck after taking the necessary steps, like deleting the .maintenance file, don’t blame your luck. It’s not only you.

Multiple things, such as server/browser cache, corrupted file issues, or permission factors, can keep your site in maintenance mode.

Consider following the steps below if you are still stuck with the maintenance mode error after removing the maintenance file from the root folder.

Increase The PHP Memory Limit

All WordPress operations, including theme/plugin updates, require a certain amount of memory allocated by your server’s PHP configuration. The PHP memory limit is typically set to 128 MB by default.

DreamHost Glossary

PHP

PHP (Hypertext Preprocessor) is an open-source scripting language. It’s widely used in web development and can be embedded in HTML. Several popular Content Management Systems (CMS), such as WordPress, are built with PHP.

Read More

WordPress updates require a certain amount of memory to process. Updates may fail due to low memory issues, triggering the “Briefly unavailable for scheduled maintenance” error.

You can increase the PHP memory limit to meet the application’s specific requirements. Edit the wp-config.php file by adding define (‘WP_MEMORY_LIMIT’, ‘256M’) to allocate more memory, helping to ensure updates run smoothly without interruption.

Update The wp-activate.php File

If you can’t find the .maintenance file in your site’s root directory, or if the maintenance error notification is still displayed after deleting the .maintenance file, you need to update the wp-activate.php file.

You can find the file in the WordPress root directory.

Then, edit the following code:
define ('WP_INSTALLING', true)

And replace the value true with false.

It should look like this after the update:
define ('WP_INSTALLING', false)

Save the file and refresh your site.

Clear The Site’s Cache

Site caching mechanisms save a snapshot of your website’s data and content, allowing visitors to load faster. So, even if you remove the .maintenance file, the maintenance error may appear.

Clearing your website’s cache and temporary files will ensure that all visitors see the most recent version, free of maintenance error messages.

If you’re using one, you can usually do this through your website’s caching plugin, hosting control panel, or content delivery network (CDN).

DreamHost Glossary

CDN

CDN is an abbreviation for “Content Delivery Network”. It refers to a geographically-distributed network of web servers (and their data centers). The entities that make up a CDN collaborate to ensure speedy content delivery via the internet.

Read More

How To Prevent The “Briefly Unavailable For Scheduled Maintenance” Error In WordPress

Prevention is better than the cure and helps avoid falling into the same trap twice. Take the necessary actions to block all the possibilities that may lead you to the WordPress maintenance error.

Let’s look at some of the most effective ways to avoid the “Briefly unavailable for scheduled maintenance” error in WordPress.

Keep Your Browser Tab Open During Updates

Please keep the browser tab open until the text Disabling Maintenance mode appears on your WordPress screen. This means that the updates have been completed and WordPress has removed the .maintenance file.

When you are on a tab during a WordPress update, it helps keep a stable connection between the server and browser. Thus, the PHP scripts run correctly.

The site may stay in maintenance mode if you close the browser prematurely. So, you must keep an active session until the WordPress admin dashboard confirms all updates.

Avoid Updating Too Many Themes And Plugins At Once

Please avoid updating all plugins or themes just because WordPress allows it. WordPress can handle all the updates, but other factors like hosting server load and internet speed can result in timeouts or incomplete updates.

For example, if you use shared hosting, bulk updates can overload your shared hosting server, forcing the updates to a halt.

Process updates in smaller batches to ensure they can be completed without interference. It lowers the chance of errors and allows the site to remain in maintenance mode.

Check Themes And Plugins Compatibility

Before starting any updates, review each plugin and theme’s changelog and compatibility information. It should confirm that they support your current WordPress version.

Beyond that, we recommend learning about known conflicts with plugins and themes before installing them. That way, you can take precautions against any potential problem.

Note that compatibility issues can cause other errors or technical difficulties on your website besides the “Briefly unavailable for scheduled maintenance” error. So, checking for compatibility is always a good practice.

Use A Staging Website To Test Updates

A WordPress staging site is a copy of your live website that lets you test the effects of any changes before they go live.

It entails duplicating your site’s data and structure, applying and testing updates, and only deploying them to the live site after ensuring their stability. Using a staging site is critical to avoiding errors and downtime on your live site.

Upgrade Your Hosting Plan

Dedicated or VPS hosting plans come with better resources and server configurations, like more memory, processing power, and better database management, which can speed up your site’s update process.

We suggest opting for these plans if your site receives a lot of traffic or has a lot of complex plugins and themes. It ensures that updates run smoothly without consuming excessive resources, which can cause issues in maintenance mode.

Use A WordPress Maintenance Plugin

Another efficient way to avoid maintenance mode errors is to use a WordPress plugin. These WordPress plugins provide a controlled environment while you update, maintain, or develop your website.

Here are some of the core benefits of using a WordPress maintenance plugin to manage your WordPress website maintenance:

  • They automatically activate and deactivate maintenance mode, reducing the risk of a failed update or manual error trapping the site.
  • They allow you to display a user-friendly notice to visitors instead of an error message while you update files.
  • They provide countdown timers, sign-up forms, and contact information to engage and inform your audience.

Let’s introduce you to some of the best WordPress maintenance plugins:

WP Maintenance

WP Maintenance offers a clean and straightforward approach, providing essential tools for quickly creating a maintenance mode page.

It includes features like customizable backgrounds, text, and user roles, allowing for a personalized approach to site maintenance.

SeedProd

SeedProd is known for its drag-and-drop builder, which provides an easy-to-use interface for creating visually appealing coming soon or maintenance pages.

It includes features like SEO-friendly maintenance mode, social media integration, and email marketing service integrations​​.

LightStart

LightStart is a flexible WordPress plugin with customizable maintenance pages, subscription forms, countdown timers, contact forms, and social media icons.

It supports responsive design, works with any WordPress theme, provides SEO options, and allows URLs to be excluded from maintenance.

Elementor Maintenance Mode

Elementor Maintenance Mode is a feature if you use Elementor to build your website. It allows for detailed customization of maintenance pages using Elementor’s powerful design tools.

It ensures that your maintenance mode has no negative impact on the user experience or SEO.

Prevent The WordPress Maintenance Error With DreamHost

Server timeouts, loss of connectivity, errors in file extraction, permission issues, and script execution time limits are the primary causes of the “Briefly unavailable for scheduled maintenance” in WordPress.

In most cases, you can avoid these problems using intelligent and efficient hosting services that reduce the possibility of these errors.

Solving problems makes you smarter, but avoiding problems makes you the master.

You can become the master of your WordPress site by using a hosting service that avoids this WordPress maintenance error and other common WordPress issues.

Check out our DreamHost’s WordPress Hosting Plans today! We provide personalized technical support to assist you with any WordPress problems.

Get Content Delivered Straight to Your Inbox

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

The post How To Fix “Briefly Unavailable For Scheduled Maintenance” Error In WordPress appeared first on Website Guides, Tips & Knowledge.

]]>
How To Fix The “WordPress Keeps Logging Me Out” Problem https://www.dreamhost.com/blog/how-to-fix-wordpress-keeps-logging-out-error/ Fri, 08 Mar 2024 09:00:00 +0000 https://dhblog.dream.press/blog/?p=32117 If you’re on this page, you’ve probably searched for something like, “Help! WordPress keeps logging me out!” WordPress is the internet’s most popular Content Management System (CMS), with an estimated 62% of the CMS market share. Despite this, it isn’t perfect. Things can still go wrong. For example, you may need to deal with the […]

The post How To Fix The “WordPress Keeps Logging Me Out” Problem appeared first on Website Guides, Tips & Knowledge.

]]>
If you’re on this page, you’ve probably searched for something like, “Help! WordPress keeps logging me out!”

WordPress is the internet’s most popular Content Management System (CMS), with an estimated 62% of the CMS market share. Despite this, it isn’t perfect. Things can still go wrong. For example, you may need to deal with the “WordPress keeps logging out” problem that’s landed you here.

Fortunately, being logged out of WordPress frequently is usually a pretty minor problem that most beginners can solve by using some basic troubleshooting methods, like clearing caches and disabling plugins. This is generally enough to isolate and solve the issue. And if that doesn’t work, reaching out to your hosting provider should shed some light on what’s going on.

DreamHost Glossary

WordPress

WordPress is an open-source Content Management System (CMS). Since it is free and accessible, WordPress is used to power almost any type of website, from blogs to e-commerce businesses.

Read More

In this article, we’ll look at some of the most common reasons why WordPress keeps logging you out. Then we’ll explore 10 methods you can use to solve the issue. Let’s get started!

Why WordPress Keeps Logging Out

WordPress requires you to enter your username and password when you want to access your website’s admin dashboard. This login process prevents unknown users from reaching your website’s back end, where they could take control of your site and potentially steal your data.

However, when you’re actively working on your website, you probably want to keep your admin dashboard open so you can easily access different areas of your back end. If WordPress keeps logging you out, we know how frustrating it can be to have to log in constantly.

There are a few reasons why WordPress might log you out:

  • Cookies with outdated information.
  • Cached files with old data.
  • An improperly configured WordPress site address.
  • Faulty plugins or theme files.

We’ll address these potential causes for the “WordPress keeps logging me out” problem in more detail in our walkthroughs below. We’ll also explore troubleshooting methods for each one.

How To Fix The “WordPress Keeps Logging Out” Problem (10 Methods)

How to fix the “WordPress keeps logging me out” problem depends on what’s causing it. If you’re having this issue, start with the simplest solutions and work your way up to more complex ones.

1. Clear Your Browser’s Cookies

One of the most common reasons for WordPress to repeatedly log someone out is when they’re trying to access their site with an expired cookie saved in their browser —which means their most recent browser session can’t be authenticated. Clearing your cookies should solve this issue if it’s the culprit for you.

Note: To make a quick test if caching or cookie settings are logging you out of WordPress, you could use incognito mode. Private browsing works by initiating a separate temporary session from the main one, allowing you to rule out session-related problems. This won’t fix the problem, but it can help troubleshoot possible issues!

DreamHost Glossary

Cookies

Cookies are pieces of data sent to a user’s computer or mobile device by a web server. They are then stored on the user’s device. Cookies can be used for authentication, identification of a user session, personalization of web content, or collecting information about the use of a website.

Read More

Clearing cookies is straightforward in most major browsers. We’ll take you through how to clear your cookies in the four most popular web browsers: Chrome, Firefox, Safari, and Edge Browser.

Google Chrome

At the top right, click on the three vertical dots icon, then click Clear browsing data. A new tab will open with a popup box. Make sure you’re in the Basic tab.

Choose a time range to delete your cookies. To delete everything, choose All time.

Check the box next to Cookies and other site data.

Click Clear data.

Chrome's 'Clear browsing data' window with the 'Cookies and other site data' box selected.

Firefox

In the Menu bar at the top of the screen, click on Firefox and select Preferences.

Click Privacy & Security from the menu on the left-hand side. Then, go to the Cookies and Site Data section. Click the Clear Data… button, and the Clear Data cookie notification dialog box will pop up.

Both Cookies and Site Data and Cached Web Content will be checked by default, so un-check Cached Web Content if you only want to clear cookies. Then, click Clear.

Safari

In the menu bar at the top of the screen, click Safari and select Settings.

Choose Privacy from the options across the top of the popup box, and then click Manage Website Data. From there, you can choose specific sites to remove just their cookies or click Remove All to clear all cookies.

Microsoft Edge

At the top right, click on the three horizontal dots icon. In the drop-down menu, click the gear icon for settings. From the settings menu, select Privacy, search, and services.

Choose Clear browsing data, then Clear browsing data now, and Choose what to clear.

Choose a time range to clear. Then, select Cookies and other site data and click Clear now.

2. Clear Your Browser’s Cache

If you clear your cookies and the logging out problem persists, it’s safe to assume it’s not a cookie issue. Now it’s time to clear your cache. Your browser cache contains saved versions of the websites you visit. Browsers keep a cache to store information, so pages load faster when you visit the same pages multiple times.

However, if a page is cached in your browser with an expired cookie, it could be the cause of your logging out issue. Clearing out the stored information in your browser cache is a common troubleshooting step that can help.

Like clearing browser cookies, clearing your cache is a simple and straightforward fix on most major browsers. Below, we’ll walk you through the steps, which should already look familiar if you follow the tutorial to clear your cookies.

Google Chrome

Once again, click on the three vertical dots icon at the top right of your browser, then click Clear browsing data. A new tab will open with a popup box. Like before, make sure you’re on the Basic tab.

Choose a time range to clear your cache. To delete everything, choose All time.

Check the box next to Cached images and files.

Click Clear data.

Chrome browser's 'Clear browsing data' window with the 'Cached images and files' box selected.

Firefox

In the Menu bar at the top of the screen, click on Firefox and select Preferences.

Click Privacy & Security from the left side menu. Then, go to the Cookies and Site Data section. Click the Clear Data… button, and the Clear Data popup box will appear.

Both Cookies and Site Data and Cached Web Content will be checked by default, so un-check Cookies and Site Data if you only want to clear your cache. Then, click Clear.

Safari

In the menu bar at the top of the screen, click on Safari and select Settings.

Choose Privacy from the options at the top of the popup box, and then click Manage Website Data. From there, you can see a list of sites and whether they have cookies, cache data, or both saved. You can select specific sites to clear their data, or click Remove All to clear your entire cache and all cookies simultaneously.

Get Content Delivered Straight to Your Inbox

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

Microsoft Edge

Go to Settings, then Privacy and Clear browsing data. Then, use the keyboard command Ctrl + Shift + Del. You can also go to edge://settings/clearbrowserdata in your browser to clear your browser cache.

3. Check Your Browser Settings

If clearing your browser cache and cookies didn’t stop WordPress from logging you out, then it’s time to look at your browser settings. A usual suspect is your browser cookie settings, which may be forcing cookies to expire and forget your login details,  prompting you to log back into WordPress constantly.

Luckily, this is another pretty easy fix. Below, we’ll show you how to access and check your browser settings in the four major browsers we’ve been using so far.

Chrome

Once again, click on the three vertical dots icon at the top right of your browser, then click Settings. Select Privacy and security in the lefthand menu and then on the right, select Site settings.

'Privacy and security' tab on the Google Chrome Settings window with 'Site settings' annotated.

Scroll down and click Third-party cookies under Content. From there, you can choose to:

  • Allow third-party cookies
  • Block third-party cookies in Incognito mode
  • Block third-party cookies

If cookies are blocked, that could be interfering with your WordPress session and logging you out. If this is the case, select Allow third-party cookies by clicking on the button next to it. And voila! Now your browser will save the cookie for your WordPress login session.

Chrome's 'Default behavior' dialog box with the 'Allow third-party cookies' option selected.

Firefox

In the Menu bar at the top of the screen, click on Firefox and select Preferences.

Choose Privacy from the options at the top of the popup box. This is where you can view your settings for Enhanced Tracking Protection, which includes cookies.

From here, you can choose:

  • Standard
  • Strict
  • Custom

If Strict or Custom is selected, some or all cookies may be blocked. Selecting Standard will revert Firefox to default cookie settings and allow all cookies.

Safari

In the menu bar at the top of the screen, click on Safari and select Settings.

Choose Privacy from the options at the top of the popup box. From here, you can choose an option for Cookies and website data from these four:

  • Always block
  • Allow from current website only
  • Allow from websites I visit
  • Always allow

Choose Always allow to make sure cookies are allowed and won’t cause WordPress-related issues.

Microsoft Edge

At the top right, click on the three horizontal dots icon. In the drop-down menu, click the gear icon for settings. From the settings menu, select Cookies and site permissions.

Click Manage and delete cookies and site data. From here, you have three options:

  1. Allow sites to save and read cookie data
  2. Block third-party cookies
  3. Preload pages for faster browsing and searching

Choose Allow sites to save and read cookie data to make sure your cookie settings aren’t causing the “WordPress keeps logging out” error.

4. Clear Your WordPress Site’s Cache

Now that we’ve covered browser-related causes, it’s time to explore other potential reasons WordPress keeps logging you out. If you have a WordPress caching plugin installed, it’s the next place to look. It’s possible that the plugin is storing an outdated version of your site, triggering the “WordPress logging out” issue.

Depending on which caching plugin you use, you’ll typically have an option (or a set of options) on your admin dashboard to clear your WordPress cache with just one click. Go to your dashboard and look at the admin bar at the top of the menu. It’ll likely say something like Delete Cache or Purge Cache.

WordPress's dashboard with 'Page Cache' circled in the admin bar at the top of the page.

Once you click the button or choose the option you want, WordPress will direct you to your caching plugin, where you can either select more options or confirm that you want to delete your cache. You may even be able to choose specific cache elements to delete. When you reload your WordPress site, it will automatically generate a new cache.

5. Clear Your CDN Cache

DreamHost Glossary

CDN

CDN is an abbreviation for “Content Delivery Network”. It refers to a geographically-distributed network of web servers (and their data centers). The entities that make up a CDN collaborate to ensure speedy content delivery via the internet.

Read More

Although it’s rare, a CDN caching issue could be the reason WordPress keeps logging you out. Some caching plugins allow you to integrate your CDN with them, meaning you can clear your CDN cache within the plugin options. We’ll show you how to do this in the W3 Total Cache plugin— a free, easy-to-use cache plugin option.

'Performance' tab selected from WordPress's dashboard to display CDN plugins.

From your WordPress admin dashboard, click on Performance, then CDN.

From there, the W3 Total Cache plugin should give you two buttons:

  • One to purge single objects from the CDN
  • One to purge the CDN completely

In this case, you’ll want to click the second button and purge the entire CDN cache. Then, you can see if the login issue has been resolved.

If you don’t have a cache plugin with integrated CDNs and you don’t want to download one like W3 Total Cache, you’ll need to contact your CDN provider to find out how to clear your CDN cache.

6. Check Your WordPress Site Address

Another reason why WordPress might keep logging you out is because there’s a mismatch between your WordPress site address and the URL saved in the login session cookies. Often, this happens after a domain name change or when you add an SSL certificate, usually because you might forget to update the website URLs in WP-Admin.

You can check this by going to Settings (in the menu on the left side menu on your admin dashboard) and clicking on General. You may need to scroll down a bit, but you should see two URL fields labeled:

  • WordPress Address (URL)
  • Site Address (URL)
'Settings' tab selected from WordPress's left-side menu with 'WordPress Address (URL)' and 'Site Address (URL) fields annotated.

WordPress Address is the location of your WordPress files, while Site Address is the address visitors need to type to find and access your website.

In the Site Address field, you can set the URL to either http://www.yourdomain.com or http://yourdomain.com. Some people prefer not to have “www” before their domain name for branding reasons or to make their URLs easier to type.

What you’re looking for here is if the two addresses in both these fields are mismatched. If that’s the case, WordPress may see the discrepancy and log you out by default. You may be able to just edit the URLs right there in your Settings, then click the Save Changes button at the bottom of the screen. However, if that doesn’t work or if you can’t stay logged in for long enough to update the URL settings, you’ll have to fix this another way.

The best way to do this is to edit your wp-config.php file. This document contains vital information for your WordPress site, like its database connection details.

You can access this file using a Secure File Transfer Protocol (SFTP) client. One of the most popular options is the free FileZilla program. If you’re a DreamHost customer, you can also use our secure WebFTP program.

Start your SFTP client and look for the wp-config.php file. You can find it in the root directory of your domain.

Open the file and paste the following code into it. You’ll want to swap out the example text for your own domain names:

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

Now save the file and close your SFTP client. After that, you can go back to your WordPress dashboard to check if the logging out issue was resolved.

7. Disable And Re-enable WordPress Plugins

Are you still with us? If none of the reasons we’ve covered so far seem to be causing your WordPress logging-out issue, the next troubleshooting step is to check for conflicts with plugins.

A plugin is an add-on that you have installed on your WordPress site. You may have sourced it from the Plugins section on your site or through the WordPress plugin directory.

A faulty plugin could be causing WordPress to log you out if it performs login authentication using cookies to function on your site. To see if this is your problem, you need to isolate and disable the faulty plugin.

Apart from the reasons we’ve mentioned so far, a faulty WordPress plugin could also be behind the “WordPress keeps logging me out” issue. This is particularly likely if that plugin performs login authentication using cookies. Poorly-coded plugins can also be the cause of login or logout issues. To see if this is the cause of your problem, you will need to pinpoint the faulty plugin first and then disable it.

If you only have a few active plugins, this will be an easy process. However, if you have many add-ons, buckle in — this is going to take a while!

You can deactivate plugins by clicking Plugins and then Installed Plugins on the left side menu on your WordPress admin dashboard.

'Plugins' drop-down menu with 'Installed Plugins' selected and an option to 'Add New Plugin.'

Check the box next to Plugin at the top of the list to select all of your installed plugins, then access the Bulk actions drop-down box above the list. Choose Deactivate and then click Apply.

'Bulk actions' chosen from the drop-down menu and highlighted on top of the installed plugins options.

You’ll need to reactivate each plugin one at a time and test to determine if it is the issue. You can do this by enabling one plugin, logging back into your WordPress dashboard, and checking to see if it triggers the problem. Clear your cache in between each plugin. When you start having login issues again, the last plugin you reactivated is most likely to blame.

If you find a faulty plugin, you’ll want to delete it from your website. You may even want to contact the plugin author to let them know their add-on isn’t functioning correctly.

If the logging out issue prevents you from accessing your Plugins dashboard, you can deactivate all your plugins via FTP instead. Using an SFTP client, like our WebFTP program, open your site’s wp-content folder and look for Plugins. When you find the Plugins folder, rename it something like plugins_old. This will make your plugins inaccessible to your site, effectively deactivating them. Then, change the name of the Plugins folder back. This will restore access to your plugins without reactivating them.

Now, log back into your WordPress site. It’s time for the next part of this troubleshooting method: figuring out which faulty plugin was causing your login issues. Head back to the Installed Plugins area of your admin dashboard and follow the same steps we outlined above for reactivating plugins one by one to test them. Don’t forget to clear your cache in between each plugin!

8. Increase Cookie Expiration Time

Could your WordPress logging-out issue be just a session timeout problem?

Suppose you click the Remember me checkbox on your WordPress login screen but find that it’s logging you out too often anyway. In that case, you can increase the time period you stay logged in by extending the expiration period for your site’s authentication cookie. Doing this will increase the amount of time you stay logged in, but keep in mind that this can create security concerns, so if you plan on increasing your cookie expiration time to stop WordPress from logging you out as often, you should tighten up your site’s security in other ways.

You’ll need to use your SFTP client again to increase your site’s cookie expiration time. Locate the functions.php file of your child theme and add this code:

function qode_change_auth_cookie_expiration_period( $expiration_period ) {
$expiration_period = MONTH_IN_SECONDS; // 1 month in seconds
return $expiration_period;
}
add_filter( 'auth_cookie_expiration', 'qode_change_auth_cookie_expiration_period' );

This code uses a time constant (MONTH_IN_SECONDS) to set the authentication cookie expiration period to one month. You can also use one of these time constants instead if you want to set a different time period for your authentication cookie expiration period:

  • DAY_IN_SECONDS
  • WEEK_IN_SECONDS
  • YEAR_IN_SECONDS

Note: If you don’t want to edit any code, Biscotti is a plugin that modifies the expiration of the logged-in user cookie in WordPress to three months, six months, or one year. There’s a plugin for every problem!

9. Check For Theme Conflicts

The next possibility is a poorly coded theme.

WordPress has many high-quality themes available. However, as an open-source CMS, any developer can create a custom theme and upload it for others to use. Therefore, a poorly-coded one can slip through the cracks. It can then cause issues on your site, including the “WordPress keeps logging me out” problem.

Each year, WordPress releases a new default theme. This year, it’s Twenty Twenty-Four. To quickly and easily check for a theme conflict, you can revert your site to this or one of WordPress’ past default themes like Twenty Twenty-Three or Twenty Twenty-Two. Just go to the side menu of your admin dashboard, hover over Appearance, and then click Themes.

'Appearance' tab selected and 'Themes' chosen from the drop-down menu with options also for menus and widgets.

From this page, you can activate a past default theme (unless you deleted it, in which case you’ll need to reinstall it first). Before activating an older theme, see if a new version is available. You can also check the left-side menu for updates.

Once a new theme is activated, log out of WordPress and log back in to see if your issue is resolved.

To avoid compatibility issues from installing poorly-coded themes, make sure to read reviews from other users. Just go to the WordPress theme directory and search for the name of the theme. On the right-hand side, you’ll see the theme’s star rating, which will give you a quick idea about its popularity. Click the See all link at the top to read its reviews.

10. Contact Your Hosting Provider

Hopefully, you’ve discovered what was causing your WordPress logging-out problem by now. However, if none of these common errors were the culprit, it may be time to call in some reinforcements. At this point, it’s a good idea to contact your web hosting provider for assistance because the issue could be a domain or server misconfiguration.

If your hosting company is DreamHost, just get in touch with our customer support team. We’ll be more than happy to help you solve the problem!

Fixing Other WordPress Problems

If you’re running into any other issues with your WordPress site, we have a comprehensive list of troubleshooting tutorials:

Mastering The “WordPress Keeps Logging Me Out” Problem

The “WordPress keeps logging me out” problem can be frustrating. But as you’ve just seen, you can use many straightforward troubleshooting methods to identify and solve the issue.

Where clearing your cookies or cache takes less than a minute, individually checking for conflicting plugins can eat up a lot of time. Following the steps in this tutorial, you can start with the most straightforward possibilities and gradually work toward more difficult and time-consuming ones.

Are you looking for a WordPress host that can help you out with any technical problems? DreamHost has a support team that can walk you through any website-related issues. Check out one of our WordPress hosting packages today!

Ad background image

Your Great Idea Starts with a Domain Name

Don’t let someone else register your URL. Search DreamHost’s 400+ TLDs to find the perfect fit for your website.

Master Your Domain

The post How To Fix The “WordPress Keeps Logging Me Out” Problem appeared first on Website Guides, Tips & Knowledge.

]]>
DNS Server Not Responding Error? Here’s How To Fix It (13 Ways) https://www.dreamhost.com/blog/dns-server-not-responding/ Fri, 15 Dec 2023 15:00:35 +0000 https://dhblog.dream.press/blog/?p=42689 Unlike many problems that affect websites, the DNS Server Not Responding error seems pretty descriptive. Clearly, some distant server isn’t playing ball and it’s blocking you from visiting a particular website. But what exactly is a DNS server and why is it misbehaving? In a strange way, the information provided by the error message is […]

The post DNS Server Not Responding Error? Here’s How To Fix It (13 Ways) appeared first on Website Guides, Tips & Knowledge.

]]>
Unlike many problems that affect websites, the DNS Server Not Responding error seems pretty descriptive. Clearly, some distant server isn’t playing ball and it’s blocking you from visiting a particular website.

But what exactly is a DNS server and why is it misbehaving? In a strange way, the information provided by the error message is only useful if you already know what it means.

To help you resolve this issue, we decided to take a deeper look at the DNS Server Not Responding error, and all the possible causes. Keep reading to find the answers you’re looking for!

What Does The “DNS Server Not Responding” Error Mean?

To understand this error, we first need to take a quick look at DNS, or domain name system.

DreamHost Glossary

DNS

The Domain Name System (DNS) protocol keeps records of which domain names correspond to specific IP addresses. DNS enables you to browse the web by typing in regular URLs instead of IP addresses.

Read More

Whenever you ask your browser to connect to a website, a DNS server has to convert the domain name (e.g., mysite.com) to the numeric IP address (four numbers separated by three periods, for example, 127.0.0.1) of the hosting server. This is where the site actually lives; the domain name is simply a pretty title that is easier for humans to remember.

DNS Server Not Responding error occurs when, for some reason, your browser can’t make contact with the server that handles the domain name to IP address translation.

There are three underlying reasons why this could be happening:

  • The DNS server is down or unreachable: There is something wrong with the server itself, or its network connection.
  • You have connectivity issues: Often due to an outage somewhere between you and the server, including network issues.
  • The DNS record for the domain name is incorrect or missing: This means the DNS server doesn’t know which IP address to point the domain name to.
3 possible issues with DNS server not responding error: DNS server is down, connectivity issues, DNA record error or missing

In order to fix the error, we need to work through a checklist that covers all three possible causes.

Fixing The DNS Server Not Responding Error

If the DNS Server Not Responding error appears only on your site, it might be because your domain name isn’t configured correctly.

  • Make sure your domain name hasn’t expired.
  • Check that you have an “A record” and it contains no typos.
  • If you made changes recently, give them time to propagate.

If none of this helps, or you see the error on other websites, here are all the ways you can fix a DNS Server Not Responding error:

1. Try Using A Different Browser

Strictly speaking, switching to another browser won’t fix DNS issues. But it can reveal what has gone wrong.

Every browser maintains a cache, where content is stored temporarily for quick access. The problem is that your browser cache might have stored the wrong DNS records. If this happens, you will get the same error message whenever you try to revisit the same page.

DreamHost Glossary

Cache

A cache is a temporary data storage layer that is designed to improve data access speeds by reducing the time needed to read and write data from a permanent data storage location.

Read More

By moving away from your default browser, you will be using a different cache, and each browser has its own default DNS servers. In addition, you will bypass other issues like extensions that block connections.

2. Check The Site From A Different Device

If you’re still seeing an error on a particular website after changing your browser, try swapping to a different device. This will ensure that some other unexpected issue in your local system isn’t causing the problem.

If you don’t have access to another desktop computer, simply pull out your phone and try to visit the page in question. If this doesn’t fix the error, it’s also worth connecting to a different network or switching to data.

3. Restart Your Computer

Another way to deal with cache-related problems is by restarting your device. This will flush all DNS records from your machine, so your device will have to perform a live DNS lookup when you visit the problematic page.

Restarting your device also renews its IP address and clears the DNS request queue, which can be enough to fix certain connectivity issues. It could be enough to clear the error.

Get Content Delivered Straight to Your Inbox

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

4. Restart Your Computer In Safe Mode

Sometimes, software and related drivers on your device are the cause for the blocked DNS connections. To test for this issue, it’s a good idea to boot up your device in Safe Mode:

Windows:

  1. On the sign-in screen, click Restart while holding Shift.
  2. Select Troubleshoot > Advanced options > Startup Settings > Restart.
  3. After restart, press 5 or F5 to start up your device in safe mode with networking.
screenshot of the startup settings in windows highlighting the restart button in the lower right-hand corner

Mac: Hold Shift as you power up.

screenshot of a mac starting up in safe mode

iOS / Android: Press and hold the power button, and then tap the down volume control after the screen lights up.

screenshot of a ios mobile phone power selector settings highlighting the safe mode option

In this mode, your machine will revert to default settings and only the most essential drivers. If the problem sites load normally while in Safe Mode, it means that either third-party software or drivers are causing incompatibility issues.

This is definitely bad news, because the only way to track down the precise cause is by testing your apps, one by one. That said, it’s most likely to be something like a VPN, or security software causing your headaches.

5. Turn Off Antivirus Software And/Or Your Firewall

Antivirus applications and firewalls protect your device by monitoring traffic. From time to time, these tools sometimes meddle too much with your internet connection and end up causing DNS server errors.

As such, it’s a good idea to switch off your antivirus program and/or firewall protection temporarily, to test whether they are causing the problems.

If this resolves the problem, make sure to turn your protection back on. Then, look through the settings to find anything related to DNS that may be causing your troubles. If your chosen software package includes support, it may be worth reaching out to your provider for help.

6. Turn Off Your VPN

VPNs, or virtual private networks, provide an extra layer of online privacy by routing data to your device through an encrypted tunnel. So far, so useful. The issue is, the tunnel might be bypassing your default DNS servers.

To test this idea, switch off your VPN and try to visit the page where you had the DNS server issue. If this resolves your problems, restart the VPN and take a peek at the settings. You’re looking for controls related to DNS filtering. If you need a helping hand, try contacting your VPN provider for support.

7. Flush DNS Cache

You don’t necessarily need to restart your device to flush the DNS cache. You can do it manually instead:

  • Windows:
  1. Press Win + R and type in the “ipconfig /flushdns”.
  2. Then, hit Ctrl + Shift + Enter to run the command prompt.
  • Mac:
  1. Open the Terminal, and type in “sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder”.
  2. Press Enter.
  3. Input your admin password when prompted, and press the Enter button again.
  • iOS: Turn Airplane Mode on and back off again.
  • Android
  1. In Chrome, type “chrome://net-internals/#dns” into the search box.
  2. Select DNS on the left, and then tap Clear host cache

By flushing your DNS cache, you will force your device to re-query the DNS server for each site you visit. This ensures you have updated mappings of domain names to IP addresses — an essential first step in network diagnostics.

8. Restart Your Router

Network connection issues are a common cause of DNS server errors. One easy way to fix this kind of problem is by restarting your internet router.

Switch it off and unplug the power cable for around 30 seconds. This should clear any corrupted DNS entries that have been stored in the router cache, and renew your connection.

At the same time, it’s worth checking that your router’s firmware is up to date. Outdated firmware can cause connectivity issues that prevent DNS lookups. In combination, these steps might fix your problem.

9. Disable IPv6

Internet protocol is the system that creates a unique IP address for every device on the internet. The current version is IPv6 (Internet Protocol Version 6), which has gradually replaced IPv4 over the past few years. It is now the default option.

However, not every network and DNS server has been updated to IPv6.

If you use this version to request a particular web page, you might only receive a DNS Server Not Responding error. Similarly, systems that are in hybrid mode can experience technical troubles in juggling both systems.

For this reason, it’s worth temporarily switching off IPv6 to see whether you can access a website via IPv4.

The exact process depends on your platform, but it usually involves:

  1. Visiting the network settings on your device.
  2. Selecting your active connection (usually Ethernet or Wi-Fi).
  3. Accessing the advanced options via Advanced, Properties, or i.
  4. Toggling IPv6 off, and saving your changes.
screenshot of windows DNS settings options to toggle IPv4 and IPv6 on and off

Lastly, you will need to restart your device to test whether this potential solution has worked. If you see no improvement, reverse the process to switch IPv6 back on — this can help you to maintain better performance as you move between different networks.

10. Change The Default DNS Server

Normally speaking, your device connects to a DNS server provided by your ISP (Internet Service Provider). If you’re having DNS issues, it might be because this server is misbehaving. The solution here is to switch to a different server.

Organizations like Google and Cloudflare provide public DNS servers that anyone can use. Some people prefer using these servers because they can speed up page loading. In other cases, people use an alternative DNS server for privacy reasons.

Some of the most popular alternate DNS providers include:

  • Google: 8.8.8.8 and 8.8.4.4
  • Cloudflare: 1.1.1.1 and 1.0.0.1
  • OpenDNS: 208.67.222.222 and 208.67.220.220

Here’s how to switch your DNS server address.

Windows:

  1. Navigate to Control Panel > Network Connections > Properties. 
  2. Under Preferred DNS server, enter the IP address of your preferred DNS server.
  3. Under Alternate DNS Server, put in the address of your backup server, and save your changes.
screenshot of windows IPv6 properties calling attention to the use the following DNS server addresses text boxes

Mac:

  1. Navigate to System Preferences > Network and select your primary internet connection in the sidebar.
  2. Click Details (or Advanced on older Macs) then select DNS.
  3. At the bottom of the DNS servers list, click the + button and enter your new DNS address.
  4. Make sure to click Apply before leaving the Network screen.
screenshot of windows IPv6 properties calling attention to the use the following DNS server addresses text boxes

iOS Mobile

  1. Navigate to Wi-Fi settings (they might be under Network & Internet)
  2. Find the DNS settings…
  3. On iOS, tap the i icon, then Configure DNS.
  4. Select Manual < Add server to update DNS.
screenshot of an ios mobile phone configure DNS settings screen

Android Mobile

  1. On Android, open Settings > Connections > More connection settings.
  2. Tap on “Private DNS” and choose “Private DNS provider hostname to change the DNS server.
screenshot of an android private DNS setting screen

Once you have finished changing your DNS server settings, restart your device before trying to access the internet. This will ensure that the new DNS settings are adopted, giving you a chance of beating those pesky errors!

11. Update Network Adapter Drivers

A network adapter driver is a piece of software that allows an operating system to communicate with a network adapter. This is the small card in your device that handles internet connections.

If the driver software isn’t regularly updated, it can start to create problems. Likewise, a driver that is corrupted, or incompatible with a new network adapter, is likely to create headaches.

One possible symptom is — you guessed it — the kind of DNS error we’re trying to fix.

Many devices update their network drivers automatically; macOS handles this chore behind the scenes. On Windows, you can take control of the adapter settings yourself:

  1. Visit Device Manager.
  2. Right-click Network Adapter.
  3. Select Update Drivers from the drop-down menu.

If possible, it’s a good idea to connect to the internet via an Ethernet cable when updating your drivers. The reason is simple: you’re updating the piece of hardware you need in order to download the update. Interruptions due to poor Wi-Fi signal can mess up the process.

Once you have updated your drivers successfully, restart your device and see if DNS is working properly.

12. Disable Secondary Connections

Some devices have more than one network adapter. For example, wired and wireless connections use different adapters.

In most cases, you only need to use one adapter at a time. Switching off all secondary connections is a good idea because they can cause problems with DNS requests.

To do this, visit the network settings on your device and turn off all live connections other than the one you’re using (e.g., If you’re connected via Wi-Fi, disable the Ethernet connection.)

It’s also worth checking whether you have a virtual network adapter running. This is a digital service that allows multiple connections via the same physical adapter. It’s a feature used by VPNs, allowing you to tunnel some traffic through the private network, and some through a regular internet connection.

To make sure a misbehaving virtual network adapter isn’t causing your problems:

  • Windows:
  1. Open Control Panel > Network Connections.
  2. Right-click on the virtual adapter you want to switch off, and select Disable.
  3. Confirm you want to disable the adapter. This will take it offline.
  • Mac: 
  1. Open System Preferences > Network.
  2. Select the virtual adapter in the left sidebar, and click the gear icon.
  3. Select Make Service Inactive to disable the adapter.
  • Mobile:
  1. Find the VPN settings on your device.
  2. Tap the i or gear icon.
  3. Switch off the adapter.

Once again, try to reload the malfunctioning page to see if the DNS error message has cleared.

13. Disable Peer-To-Peer Feature (Windows)

No luck? Don’t worry, there is one more potential fix you can try.

Windows has a peer-to-peer feature, which helps to reduce the amount of bandwidth needed while downloading updates. Rather than forcing your device to swallow all the data in one big lump, this option splits updates into individual pieces. The PC that receives these pieces can then share them with others on the same network.

This is obviously a useful feature. But as you might have guessed already, Windows P2P can interfere with the DNS lookup process. Switching it off can help you to diagnose errors:

  1. Navigate to Settings > Windows Update.
  2. Next, click on Advanced Options > Delivery Optimization.
  3. Toggle the switch labeled Allow downloads from other PCs.
screenshot of the windows delivery optimization settings screen found under windows update where you can toggle allow downloads from other PCs on and off

You will then need to restart your computer to test, once again, whether the DNS error has cleared. Fingers crossed!

Frequently Asked Questions

Still have questions? You’ve come to the right place. Here’s a little extra detail on fixing your DNS settings, and a closer look at why failures happen:

How Do You Reset Your DNS Server?

After following the various troubleshooting steps above, you may decide that you want to go back to the domain name servers you originally had.

To achieve this, simply retrace the exact steps mentioned in #10 — but this time, select your current DNS servers and press the little minus button to remove them. After a restart, your device should then revert to the default ISP DNS servers.

What Causes A DNS Failure?

In simple terms, a DNS failure happens when your browser cannot convert a domain name to an IP address. However, there can be many different underlying causes.

The DNS process offers access to over 1 billion internet hosts. That’s one mighty “phone book.” So, it’s almost inevitable that the system will have some flaws.

Most DNS problems that people encounter are caused by issues with internet access or software on their device. Actual failures are most commonly caused by server outages or incorrectly configured domain names.

Set Up Your Site Correctly With DreamHost

If you want to avoid seeing DNS errors pop up on your website, you might want to switch to DreamHost.

Our hosting panel makes it really easy to configure your site correctly and manage all your domain names on a single page. If you ever get stuck, our Technical Support team is available 24/7 to provide help — and that’s on every single plan.

Sounds good? Sign up today to give it a try for yourself!

Get Content Delivered Straight to Your Inbox

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

The post DNS Server Not Responding Error? Here’s How To Fix It (13 Ways) appeared first on Website Guides, Tips & Knowledge.

]]>
How To Resolve The ERR_CONNECTION_REFUSED Error https://www.dreamhost.com/blog/how-to-fix-connection-refused-error/ Thu, 30 Nov 2023 15:00:31 +0000 https://dhblog.dream.press/blog/?p=42481 Oh no. You’re trying to load a page on your website, but all you get is an ERR_CONNECTION_REFUSED error message. In many cases, this is caused by a gremlin on your device. Bad browser extensions, misbehaving proxies, and poor internet connections are all possible causes. But if you find the error popping up on someone […]

The post How To Resolve The ERR_CONNECTION_REFUSED Error appeared first on Website Guides, Tips & Knowledge.

]]>
Oh no. You’re trying to load a page on your website, but all you get is an ERR_CONNECTION_REFUSED error message.

In many cases, this is caused by a gremlin on your device. Bad browser extensions, misbehaving proxies, and poor internet connections are all possible causes. But if you find the error popping up on someone else’s computer, or connected to a different Wi-Fi network, you might need to take action to fix your site.

If you’re not familiar with the ERR_CONNECTION_REFUSED error, knowing where to begin can be tricky. How do you even diagnose the problem? Well, this guide is a good place to start.

Keep reading to discover why this error happens, and how you can fix it.

What Is An ERR_CONNECTION_REFUSED Error?

ERR_CONNECTION_REFUSED is an error that can occur when you try to connect to a web server or other network service. It indicates that the server actively refused your connection attempt. This is usually because the server isn’t accepting incoming requests.

Technically, it’s worth noting that ERR_CONNECTION_REFUSED errors happen at the network connection level. That is, before any HTTP request is sent. That’s why you don’t see an HTTP status code ( like a 404 or 500).

The ERR_CONNECTION_REFUSED error is also different from getting no response at all. A refused connection means something is listening but rejected it. No response indicates that the server isn’t even listening.

side by side diagram showing the computer going to the server, received, but ignored versus err_connection_timed_out where the computer goes to the server with absolutely no server response

What Causes ERR_CONNECTION_REFUSED Errors?

So, why is the server being so antisocial? Well, there could be several possible reasons:

  • The web server hasn’t got the proper software installed.
  • The incorrect server has been requested, or a DNS issue.
  • The server software has crashed, or there is server downtime due to maintenance.
  • The listening process has been stopped intentionally.
  • A firewall or some other software is blocking the port for incoming requests.
  • A faulty internet connection, or incorrect internet settings.

In other words, the troubleshooting process revolves around figuring out why the server is refusing requests. It could either be a problem on the client side (i.e., visitor devices) or on the server side.

What Does An ERR_CONNECTION_REFUSED Error Look Like?

Bear in mind that ERR_CONNECTION_REFUSED errors appear differently depending on which platform and browser you’re using.

On Google Chrome, you will see an error page that reads, “This site can’t be reached.”

screenshot of a "this site can't be reached" error in Google

Mozilla Firefox users who encounter an ERR_CONNECTION_REFUSED error will see a message that says, “Unable to connect Error.”

screenshot of a "unable to connect" error in Mozilla

Meanwhile, those of us who use Microsoft Edge will get a different page, with the message, “Hmmm…can’t reach this page.”

screenshot of a "hmmm...can't reach this page" error in Edge

How To Fix An ERR_CONNECTION_REFUSED Error

Now we know the issue we need to solve, it’s time to start making some investigations.

Whoa there, Sherlock! Before you start digging around on your server, it’s important to run a quick test. Are you seeing the error only when visiting your website, or does it appear on multiple sites?

If the problem is universal, you have a client-side error. Scroll down to the section on troubleshooting tips for visitors.

But if the ERR_CONNECTION_REFUSED message only appears for your website, you will need to take action to get your site working again.

Don’t worry, this shouldn’t take long. Here’s your checklist:

Disable Active Plugins

One common culprit for server-side issues is an incompatible or buggy plugin. If you have any plugins or extensions installed within your CMS, try disabling them and see if that resolves the issue.

DreamHost Glossary

Content Management System (CMS)

A Content Management System (CMS) is a software or application that provides a user-friendly interface for you to design, create, manage, and publish content.

Read More

In WordPress, you can disable plugins quickly from your dashboard:

  1. Go to Plugins > Installed Plugins.
  2. For each active plugin, click Deactivate.
  3. Check if the site works normally now, without plugins.

If the errors disappear, try reactivating your plugins one by one. Test the site after you enable each plugin.

If the error message crops up again, the plugin you last activated is the one to blame. If an update is available, make sure to install the current version.

Otherwise, it might be time to find an alternative.

Change Your Theme

Much like plugins and extensions, themes can be the cause of ERR_CONNECTION_REFUSED errors. This is most likely to happen if you’re using an outdated third-party theme.

To test whether a theme is causing your headaches, switch to an official theme made by the developer of your chosen CMS. In WordPress, this would mean switching to the Twenty Twenty-Three theme via your dashboard:

  1. Go to Appearance > Themes.
  2. Click Activate on Twenty Twenty-Three, or the latest default theme.
  3. Check if ERR_CONNECTION_REFUSED has resolved after making the switch.

If you no longer see an error, your custom theme probably needs an update or reset. Reach out to the developer of your theme for fixes, or consider changing to a different theme.

Increase Your PHP max_execution_time

Some connection errors happen because a script on your website is taking too long to execute. One way to address this is by increasing the max_execution_time in your PHP settings.

DreamHost Glossary

PHP

PHP (Hypertext Preprocessor) is an open-source scripting language. It’s widely used in web development and can be embedded in HTML. Several popular Content Management Systems (CMS), such as WordPress, are built with PHP.

Read More

To test whether this is the cause of your problems, try doubling it from 30 seconds to 60 seconds:

  1. Add this line to your wp-config.php file: ini_set( ‘max_execution_time’, 60 );
  2. Save changes and test if timeout errors reduce.

If you don’t have access to PHP configs, reach out to your web host for assistance with increasing timeouts.

Get In Touch With Your Host

If you’ve tried all the troubleshooting tips mentioned above and are still seeing ERR_CONNECTION_REFUSED, it’s a good idea to get in touch with your web host’s support team.

They have better access to key information, meaning they can investigate the problem at a deeper level.

Send them details about the error and when it seems to happen. Your host can then check server logs, load, configurations, and resource usage to pinpoint the cause.

Folks who host their website with DreamHost get 24/7 access to our excellent support team via live chat. They can diagnose any strange errors that pop up, and get your site back up and running smoothly.

How To Fix ERR_CONNECTION_REFUSED Errors As A Visitor

As you try to track down the cause of your ERR_CONNECTION_REFUSED woes, it’s worth bearing in mind that these errors often come from the client side. In other words, something that is specific to your device or network.

If you’re seeing errors popping up all over the place, try following these troubleshooting steps:

Clear Out Your Browser

An easy place to start is by clearing your browser cache and cookies.

As you explore the web, your browser saves files locally for quick access. These files can get corrupted, leading to connectivity issues like refused connections.

The process for clearing out your cache and cookies usually involves visiting your browser settings menu. On the desktop version of Chrome, the process looks like this:

  1. To the right of the address bar, click the three dots in the menu bar.
  2. Select Settings from the drop-down menu.
  3. Navigate to Privacy and Security > Clear Browsing Data.
  4. Select Cached images and files and Cookies and other site data, before clicking Clear.
screenshot of the "privacy and security" menu in Chrome with attention to the "clear browsing data" option on the right side

Then, try to reload the webpage to see if the error has cleared.

Check Your Internet Connection

One common cause of the ERR_CONNECTION_REFUSED error is an unreliable internet connection.

If you’re at home, check that the status lights on your router are lit up as usual. Red lights can mean that the internet connection to your home isn’t working properly.

The problem may resolve itself in a few minutes. Otherwise, you might need to get in touch with your ISP (Internet Service Provider).

If you don’t have easy access to the router, you can check your connection by running a speed test. Google has one built in; Just search for “speed test” and follow the instructions provided.

Bear in mind that it’s not always the actual internet connection that is to blame — Sometimes, routers misbehave. To check your Wi-Fi connection:

  • On Windows: In the Control Panel, go to Network and Internet > Network and Sharing Center, and select the blue Wi-Fi link.
  • On Mac: Hold the option key, and click the Wi-Fi icon on the status bar at the top of your screen. Then, select Wireless Diagnostics from the menu.

Restart Your Device

Sometimes, all you need is a simple restart to clear up connection issues.

Try rebooting your computer, phone, tablet, or even your router if you can easily gain access to the power button or unplug the power supply.

This process flushes the DNS resolver cache, meaning that any invalid DNS address will be washed away. Restarting your devices will also reset certain network settings to the original default settings.

(It’s also possible to flush your DNS cache manually without having to turn off your device).

Dive Into Your DNS Settings

When a simple reboot doesn’t do the trick, it might be because the DNS configuration you are using isn’t working correctly. This can cause errors because your browser doesn’t know where to find the website you want.

To test this possible cause, you will need to switch to an alternate DNS server. You can do this by visiting the internet settings panel on your device and finding the DNS configuration options:

On Windows: Open Start and type “Control panel” in the search bar. Click on the app to open and navigate to Network and Sharing Center. Click on your current network next to “Connections” and then open Properties. Click Use the following DNS server addresses.

Type in one of the public DNS addresses listed below.

A screen-to-screen flow of the workflow to reset the DNS server in windows

On Mac: In System Settings, open Network. Then, click the Advanced… button in the bottom right, and select the DNS tab.

screenshot of the DNS screen in Mac settings where a user can update theDNS

Here, you should see your current DNS server address. This is usually owned by your internet provider. Add or replace this with the IP addresses of public DNS servers. Here are some popular options:

  • Google Public DNS: 8.8.8.8 or 8.8.4.4
  • Cloudflare DNS: 1.1.1.1 or 1.0.0.1
  • OpenDNS Home: 208.67.222.222 or 208.67.220.220

If this fixes your problem, you can either keep your new server IP address or get in touch with your ISP for additional help.

Just remember, your DNS cache could be to blame. This holds temporary entries to speed up the page loading process. However, outdated DNS cache entries can block domains. If in doubt, restart your device or manually clear your DNS cache.

(Temporarily) Disable Your Security Software

Using a firewall and antivirus software is wise if you want to keep your devices secure. Unfortunately, overzealous security tools can sometimes block connections — leading to client-side issues.

To test whether firewall interference or antivirus protection is causing your ERR_CONNECTION_REFUSED errors, try temporarily disabling your security programs and see if it makes a difference.

If you’re using the built-in Defender Firewall on Windows:

  1. Head to Settings > Privacy & security> Windows Security.
  2. Click on Firewall & network protection.
  3. Select: Domain network.
  4. Under Microsoft Defender Firewall switch the setting to Off.

Don’t leave it off permanently though! If you discover that certain domain names are being blocked, make sure to whitelist them in your chosen app.

Check Proxy Settings

Much like security software, proxies and VPN services can interfere with connections and domain name resolution, leading to ERR_CONNECTION_REFUSED errors.

To check if your proxy server settings are causing issues on Windows:

  1. Visit the Control Panel.
  2. Go to Network and Internet > Internet Options > Connections > LAN Settings.
  3. Deselect two options: Automatically detect settings and Use a proxy server for your LAN.
  4. Save the changes by clicking Ok.

On Mac:

  1. Open up System preferences.
  2. Navigate to Network > Advanced > Proxies.
  3. Make sure all proxy protocols in the list are unchecked.
  4. Click Ok to save any changes.

Try loading the site again — if the error goes away, you know the proxy was at fault. Explore your network settings, or ask your network admin to allow access to any mistakenly blocked domains.

Given the privacy implications, removing proxy protection isn’t a long-term solution. However, disabling it temporarily can help you to pin down technical errors.

Disable Browser Extensions

Some ad blockers, tracking protection extensions, or VPN plug-ins added to your browser can inadvertently block access to certain sites and cause ERR_CONNECTION_REFUSED.

We see this most often with Chrome Extensions, mainly because they’re so popular.

To test if Chrome Extension issues are to blame:

  1. Click the three dots in the top-right corner, just along the search bar.
  2. Open the Extensions menu by navigating to Tools > Extensions.
  3. For each extension installed, toggle it to Off to disable it. Alternatively, you can click Remove on suspicious extensions to uninstall completely.

After disabling or removing extensions, try reloading the website displaying the error. If the site now works, turn extensions back on one by one until you identify the problematic plugin.

Make sure to note which extension caused the issue, and rummage through the settings to see whether it is set up to block any domains. Many privacy extensions have options to whitelist certain domains to get around this problem.

Take A Peek At Your .hosts File

If none of the above is making any difference, you might have a case of the .hosts file blues.

Traditionally speaking, this file is pretty helpful. It maps hostnames (like DreamHost.com) to IP addresses (like 192.0.2.235). The problem is some apps use this file to block access to specific domains.

You can find a .hosts file in every operating system:

In Windows open the Start menu and type “Notepad” in the search bar. Right-click the app and click Run as administrator. Once Notepad is open, click File > Open. Then, enter this file name into the text box: C:\Windows\System32\drivers\etc\

screenshot of the notepad open file, file name location of hosts files in Windows

For macOS, hop to Finder and navigate to /etc/hosts

sceenshot of the private/etc/hosts file in Mac

For all other operating systems:

  • Linux/Unix: Check out /etc/hosts
  • Android: Using any file browser app, navigate to /system/etc/hosts
  • iOS: Via the Files app, go to /etc/hosts

Open the file and check for any blocked or redirected domains. If you find any, edit the file to remove those entries. Then, see if you still have an error when loading websites.

Reinstall Your Browser

If you’ve tried all other troubleshooting steps and are still seeing ERR_CONNECTION_REFUSED errors, a clean reinstall of your web browser may help resolve any corrupted files or settings causing issues.

Here’s what you need to do:

  1. Close all windows and quit the browser completely.
  2. On Windows, go to Start > Settings > Apps > Apps & features. On Mac, head over to Finder > Applications.
  3. Search for your internet browser, and uninstall the app. Confirm any prompts to fully uninstall.
  4. Next, restart your computer. This helps to flush any cached files.
  5. Download the latest version of your chosen browser. Make sure to visit the official source.
  6. Run through the reinstallation process. Make sure to deselect any options to import previous data.

Once the browser is installed, try loading the problematic sites again. The fresh install should not have any corrupted extensions, caches, or configurations that could cause issues.

If you continue to see connection issues, the problem likely lies elsewhere, such as with your network setup or the website’s server configuration. But reinstalling the browser is worth trying, just to rule out any client-side corruption. Make sure to back up bookmarks and your passwords before uninstalling!

Fix Errors Faster With DreamHost

From clearing caches, and fixing internet-related issues, to tracking down incorrect firewall settings, we’ve walked through a lot of troubleshooting methods in this guide.

In most cases, you won’t need to use every possible solution. Using simple tests, you should be able to figure out the likely problem:

  • Do you only get ERR_CONNECTION_REFUSED errors on one website? Chances are, it’s a server-side issue.
  • Seeing ERR_CONNECTION_REFUSED errors on multiple sites? It is almost certainly a client-side problem.

While we can’t fix your internet connection or your proxy problems, we can fix your website if it starts showing an error.

All of our hosting packages come with 24/7 live support, and our expert staff can handle any technical query you have.

Sounds good? Sign up for hosting today to give it a try for yourself.

Get Content Delivered Straight to Your Inbox

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

The post How To Resolve The ERR_CONNECTION_REFUSED Error appeared first on Website Guides, Tips & Knowledge.

]]>
How To Fix “ERR_TOO_MANY_REDIRECTS” In WordPress (13 Tricks) https://www.dreamhost.com/blog/how-to-fix-redirect-loop-wordpress-error/ Wed, 15 Nov 2023 15:00:00 +0000 https://dhblog.dream.press/blog/?p=31942 URL redirects are necessary when you need to change the addresses of a website page permanently or temporarily. However, as a result, sometimes your website can get stuck in a redirection loop. If this happens, you may face the ERR_TOO_MANY_REDIRECTS error, preventing you from accessing specific pages. The problem usually lies within your website, browser, […]

The post How To Fix “ERR_TOO_MANY_REDIRECTS” In WordPress (13 Tricks) appeared first on Website Guides, Tips & Knowledge.

]]>
URL redirects are necessary when you need to change the addresses of a website page permanently or temporarily.

However, as a result, sometimes your website can get stuck in a redirection loop.

If this happens, you may face the ERR_TOO_MANY_REDIRECTS error, preventing you from accessing specific pages.

The problem usually lies within your website, browser, server, or third-party plugins or programs. Fortunately, redirection issues can typically be fixed by following a troubleshooting workflow.  When you know what to do 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, both on-site and off-site, and how to fix each. Plus, we’ll explain how to prevent the problem from happening again in the future!

What Causes ERR_TOO_MANY_REDIRECTS In WordPress?

The “too many redirects” error happens when your WordPress website gets stuck in an infinite redirect loop.

A redirect loop is when a web server repeatedly sends a browser to the same page over and over, preventing it from loading the intended page.

When this 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 says something like “This page isn’t working,” stating too many redirects as the issue and showing the ERR_TOO_MANY_REDIRECTS code.

screenshot of "this page isn't working" try clearing your cookies, ERR_TOO_MANY_REDIRECTS

If you use Mozilla Firefox, the error usually reads as “The page isn’t redirecting properly.” It usually displays as “Safari Can’t Open the Page” for Safari users and will let you know the reason is because of too many redirects.

Unlike some other common WordPress errors, the “too many redirects” issue doesn’t usually solve itself.

So you’ll need to troubleshoot the origins of the problem to fix it. Here’s how.

How To Solve The “Too Many Redirects” Error (13 Methods)

Various factors can cause the “too many redirects” error. Some may be within your WordPress site, but you’ll likely need to go down a few different paths before you track down and eventually solve the issue.

So with that in mind, let’s take a look at a comprehensive list of most of the possible solutions.

1. Force A Page 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

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

Get Content Delivered Straight to Your Inbox

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

2. Delete Cookies On Your Site

Cookies are small blocks of data that enable websites to remember information about your visit. Then, the sites use that data to speed up and 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. When this occurs, you should try deleting cookies from the WordPress site.

In Google Chrome, click on the three dots across from your address bar and go to Settings.

close-up of Chrome menu nav with the Settings option highlighted

In the left sidebar, go to Privacy and security (the sidebar may be collapsed, hit the three-line menu to open it). On that page, select the Third-party cookies option.

Close-up of the privacy and securities menu with "Third-party cookies" highlighted

On the next page, select See all site data and permissions.

close up of the third party menu cookies options calling attention to the option to "See all site data and permissions"

This will open a list of all the different sites storing cookies. Search for your website and use the trashcan icon next to it to delete the data it’s storing.

Once you’re done, refresh the WordPress site to see if the error is fixed.

Related: WordPress Settings Overview

3. Clear WordPress Site Or Server Cache

Caching stores information about your site so it can load faster the next time you access it.

The downside is your cache can hold onto outdated data and cause 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 to clear your WordPress cache with a dedicated caching plugin like WP Super Cache.

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

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 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 the Chrome browser, you can head back to Settings > Privacy and security. Here, click on Clear browsing data.

close up of the privacy and security settings box we saw before, but this time with "Clear browsing data" highlighted

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

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 need to try and diagnose the underlying problem. Otherwise, you might spend a lot of effort on more time-consuming strategies that still may not fix the error.

There are a couple of different methods you can use to determine the cause of redirect loops.

Firstly, you can enter your site’s URL into the Redirect Checker tool.

This free online application lets you 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 can see any status or error codes associated with your site at the bottom of the page.

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.

Unfortunately, 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 WordPress Plugins

WordPress plugins are helpful tools that can introduce new functionalities to your website. However, these add-ons can also cause 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.

Try this method if you recently added new plugins to your WordPress site. 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 like FileZilla.

(You may also be able to access your site files via your host’s file manager.)

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 domain of your site > wp-content > plugins.

Here, you’ll see a series of folders with the names of your installed plugins.

screenshot of plugin folders showing a range of 11 plugins

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

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

If you find a problem plugin, keep it deactivated and find an alternative option for your website in the WordPress plugin directory.

7. Check 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.

close up shot of WordPress lefthand nav with the "General" option selected

You’ll then see two fields for WordPress Address (URL) and Site Address (URL).

Close up of the WordPress Address and Site Address fields, both showing: https://tylhak.dream.press"

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. To do this, 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 above with the correct ones and save the file. Then reload your website and see if this solved the problem.

8. Check 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.

DreamHost Glossary

SSL/TLS

SSL stands for Secure Sockets Layer. In short, it’s a protocol for maintaining a secure connection and protecting sensitive data. Transport Layer Security (TLS) is the successor to SSL. It is a cryptographic protocol that provides a safe connection over any given computer network.

Read More

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.

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 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, such as Better Find and Replace.

But 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.

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 rules can also cause the “too many redirects” error in WordPress. These server settings may have been misconfigured when you migrated your site.

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

To determine your method, first you’ll need to know which server type your host uses.

If your site 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 when you’re done.

To adjust your HTTPS redirects on Nginx servers, you’ll need to ask support to help you adjust the config file. Have them 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; }

Once that has been put into place, reload your WordPress site.

If it doesn’t fix the problem, you know the drill — keep moving through the troubleshooting steps in this guide.

11. Check Third-Party Service Settings

If you use a third-party service such as a content delivery network (CDN) or web application firewall (WAF) like Cloudflare, its settings may cause the “too many redirects” error.

DreamHost Glossary

CDN

CDN is an abbreviation for “Content Delivery Network”. It refers to a geographically-distributed network of web servers (and their data centers). The entities that make up a CDN collaborate to ensure speedy content delivery via the internet.

Read More

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. This causes redirection loops to happen between the different processes.

That’s why we don’t recommend using the Flexible SSL setting if you have an SSL certificate from a third-party source. Instead, change your Cloudflare encryption mode 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 via HTTPS. Therefore, it avoids causing a redirect loop and triggering the WordPress error.

Finally, 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 by checking your config files.

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

DreamHost Glossary

Apache

’Apache’ is the abbreviation of ‘Apache HTTP Server’. This is a free and open-source web server software that delivers content. Its primary function is to establish a connection between a server and a browser via HTTP requests.

Read More

First, you’ll need to access your site via SFTP. Find the .htaccess file and save a copy of it, in case any mistakes are made. 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 works, you can delete the old .htaccess file and keep working with the new one.

If your site 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.

Related: The Ultimate Guide To Web Hosting

How To Prevent ERR_TOO_MANY_REDIRECTS In The Future (3 Ways)

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 them.

1. Keep Plugins 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, but you can also take preventative steps right now by keeping your current plugins up to date. This is important because updates frequently address security issues, increase compatibility, and fix bugs.

You can tell if a plugin has a new release because you’ll see an alert in your WordPress dashboard.

You can also navigate to Plugins > Installed Plugins.

close up of the wordpress navigation menu with "Installed Plugins" selected under the "Plugins" heading

Out-of-date plugins should have a message telling you there is a new version available. You can choose to update them one time or enable automatic updates.

Additionally, you can report any faulty plugins if they cause the “too many redirects” error. Find the corresponding support forum using the search bar 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 Your Cache And Stored Cookies Regularly

Earlier in the guide, we explained how to clear cache and 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 WP Super Cache allows you to remove cached files manually or 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.

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 because professionals have experience with every aspect of migrating a site.

If you prefer to do the migration yourself, here’s a checklist to use 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. Conduct 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 can 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, 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 WordPress Error To Fix?

If you need to resolve other technical problems on your site, we’ve put together tons of 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 all of our WordPress Tutorials. This is a collection of expert-written guides designed to help you navigate your WordPress control panel like a pro.

Solve Your WordPress Issues With A Trustworthy Hosting Company

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 with caring, dedicated professionals who can help you with redirection issues and other common errors?

Check out our DreamHost’s WordPress packages today! We provide personalized technical support to assist you with any WordPress problems.

Get Content Delivered Straight to Your Inbox

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

The post How To Fix “ERR_TOO_MANY_REDIRECTS” In WordPress (13 Tricks) appeared first on Website Guides, Tips & Knowledge.

]]>
502 Bad Gateway Error: What It Is and How to Fix It https://www.dreamhost.com/blog/502-bad-gateway-error/ Wed, 08 Nov 2023 15:00:15 +0000 https://dhblog.dream.press/blog/?p=38203 Experiencing a 502 Bad Gateway error? Don’t brush it off too quickly. While a simple refresh often resolves a one-off, recurring errors might signal deeper issues. If left unattended, these can snowball into significant challenges: Dwindling traffic, poor user experience, and elevated security risks, to name a few. It’s important to root out the cause […]

The post 502 Bad Gateway Error: What It Is and How to Fix It appeared first on Website Guides, Tips & Knowledge.

]]>
Experiencing a 502 Bad Gateway error? Don’t brush it off too quickly. While a simple refresh often resolves a one-off, recurring errors might signal deeper issues.

If left unattended, these can snowball into significant challenges: Dwindling traffic, poor user experience, and elevated security risks, to name a few.

It’s important to root out the cause of the issue as soon as possible, whether it’s WordPress errors or something else.

The bad news: A variety of potential server-side issues could be throwing the error. The good news is that those error codes you see? They’re your map to effective troubleshooting.

We’ll explain in simple terms what the 502 Bad Gateway error is, why it happens, and most importantly, how to make it disappear.

Let’s get started.

What Is The 502 Bad Gateway Error?

First of all, a little bit of a crash course on what’s going on behind the scenes may help everything make a bit more sense. After all, knowledge is power, right?

Every time you enter a URL into an address bar and attempt to access a site, your browser sends a request to that site’s server. The server processes that request and then displays the website’s content.

DreamHost Glossary

Server

A server is a computer that stores data. A web server is a type of server that stores and delivers web pages to users. Web servers are connected to the internet and use HTTP to send web pages to users who request them.

Read More

If something were to go wrong, you would instead see an HTTP status code. Then the fun begins.

You’ve probably faced a 404 error (page not found) at least once, if not a hundred times. It’s saying the server was able to process the request, but couldn’t locate the specific page or content.

In contrast, a 502 Bad Gateway error happens when there’s a communication breakdown between two servers. The first server relayed the message but received an invalid response from the upstream (or next) server.

In other words, the server, which acts as a gateway or proxy, received an invalid response from an inbound server and was not able to fulfill the request.

Depending on the browser you use, the status may appear in a handful of different ways:

  • 502 Bad Gateway
  • 502 Proxy Error
  • Error 502
  • HTTP Error 502 – Bad Gateway
  • Temporary Error (502)
  • 502 Service Temporarily Overloaded
502 Bad Gateway

The HTTP 502 server error isn’t limited to a problem with a proxy server or server overload, so let’s dig in a little further and look at some common causes.

What Causes The 502 Bad Gateway Error?

Several issues can return a 502 Bad Gateway error. These include:

  • An unresolved domain name – There could be connectivity issues between the domain name and your IP address. This often happens when a website recently migrated from one web host to a new hosting provider, and the DNS server hasn’t had time to propagate.
  • An oversensitive firewall – If your website (perhaps a WordPress site with a firewall plugin) or your web host has firewall settings that are too restrictive, some Internet providers or IP addresses may be blocked. This can happen when the firewall detects them as a false threat.
  • Server overload – A sudden spike in traffic can cause the origin server to crash. If your website’s server is on a shared hosting plan, your traffic can be impacted by everybody else’s traffic (like your neighbors are having a big party, and their guests are taking up all the parking spots.)

Having said the above, it should be noted that the 502 Bad Gateway error isn’t restricted to problems with the server. Client-side issues such as outdated browsers or corrupted files in the browser cache can also be a cause of the status error.

How Do You Fix The 502 Bad Gateway Error? (9 Possible Solutions)

Now, let’s look at how to fix the 502 Bad Gateway error! We’ll cover two scenarios: an issue on the client side and a problem with the server.

1. Refresh The Webpage And Try A Different Browser

We should always start with the simplest solution. The 502 Bad Gateway error could be a temporary issue. For example, the web server may have become overloaded for a few minutes or experienced a brief surge in traffic.

Try waiting a few minutes and refresh the page. If that doesn’t work, you can try accessing the same site using a different browser. If that works, then the issue may be with the original browser. If the page still doesn’t open, the website itself may be the problem.

Another way to determine whether the problem is on your end or at the web server is to use a tool like Down for Everyone or Just Me, or Is It Down Right Now to confirm whether the problem is on your end or with the site’s host.

Down for Everyone or Just Me

Using one of these tools will identify the status of your site. If your site isn’t down for everyone, you’ll need to troubleshoot on your end, and the first several steps below will help with that. If your site is down for everyone, you’ll need to check into your site’s backend to find the source of the problem, which will be addressed later in the post.

2. Test Using Another Device

Assuming you’ve been using your computer and ISP, try to access your website from your cell phone. First, go to your phone’s settings and turn off your wifi, then make sure your mobile data is enabled. If you’re able to access your site, the problem is at your end, and rebooting your network may fix the issue.

To reboot your network, shut your computer down, then unplug your modem and router. If you have an integrated modem and wifi router, unplug it, wait for about a minute, then plug in your modem and let it reboot. Then plug in your router and let it boot up. If you have integrated hardware, plug it in and let it boot.

Finally, start your computer and try to access your site.

3. Clear Your Browser’s Cache

Browsers store a lot of data, primarily to help pages load faster the next time they’re opened. However, your browser cache may contain outdated site data or corrupted files, leading to the Bad Gateway error.

Based on this, the next thing to do is clear your browser cache. Depending on which browser you use, steps may vary.

If you use Mozilla Firefox, access the hamburger menu (three horizontal bars) at the top right. Go to History > Clear recent history.

Clear Recent History

From there, you’ll open a new menu and further options. If you were able to access your site without issue yesterday, then you can choose Today in the time range field, select Cache — you can deselect the other options if you want — and then click Clear Now.

Clear Cache

For the most part, the process will be much the same if you’re using Google Chrome, Microsoft Edge, Safari, or something else. If you’re unsure, check the process for clearing cache in other browsers for specific details.

If you try to access your site after clearing the cache and still get a status error, move on to the next step.

4. Flush The DNS Cache

A 502 Bad Gateway error could also be caused by a Domain Name System (DNS) issue. For example, if you’ve just migrated your site to a new web host, the propagation process can take up to 48 hours.

However, the issue may also originate with your local DNS cache. This temporary storage on your device contains information about previously visited domain names.

If you’re using Windows, you can flush the DNS cache using the Command Prompt. To access it, type “CMD” into the Windows search on your taskbar, and press Enter.

You’ll now have access to your Command Prompt.

Command Prompt

Once the Command Prompt box is open, copy or type the following command:

ipconfig /flushdns

Let it run. When it’s finished, you’ll see a message that says, “Successfully flushed the DNS resolver Cache.”

DNS Resolver Cache

If you’re using a Mac operating system, enter or copy the following command in the terminal.

dscacheutil -flushcache

If you’re uncomfortable doing either of these, you can also use a third-party service such as Google Public DNS to temporarily change your DNS server.

5. Check Your Site’s Error Log

If your site is down for everyone and the problem is local, you can also check your site’s error logs, which may help you identify the cause of your issue. For example, it may flag a plugin conflict or update as the source of your 502 Bad Gateway error.

Your website’s log files can be accessed via a Secure File Transfer Protocol (SFTP) client, such as WinSCP or SmartFTP. Once you’ve installed your client of choice, DreamHost provides a comprehensive Knowledge Base entry on accessing your error logs via SFTP.

DreamHost Glossary

SFTP

Secure File Transfer Protocol (SFTP) is a safer version of the FTP protocol that uses a secure shell data stream.

Read More

6. Deactivate Your Plugins And Themes

Although it doesn’t happen often, a new or updated plugin or theme can cause conflict with other plugins or tools, resulting in a 502 Bad Gateway error.

Since you can’t access your WordPress admin dashboard, you’ll need to deactivate your plugins and themes using an SFTP client.

Once you’ve installed or logged into your SFTP client (see the section above for options) please refer to this DreamHost walkthrough for the steps to deactivate/disable your plugins. Note that you have the option of deactivating all of your plugins at the folder level or any single plugin of choice, perhaps the ones you’ve most recently updated or added.

When you’ve completed that step, try accessing your site again. If it’s up and running, log into your dashboard, access your plugins menu, and reactivate each deactivated plugin individually. Each time, make sure you refresh the page to determine if you still have access to your dashboard.

If you identify that a plugin is causing the status code error, either disable or delete it until the developer has released a fix.

If the problem didn’t originate from one of your plugins, you can go through this entire process again, except this time, focus on your Themes folder. Or carry on to the next possible fix.

7. Disable Your CDN Or Firewall

If everything so far has failed, the next thing to check is your Content Delivery Network (CDN) or firewall. Note that your firewall could be a stand-alone plugin, part of your overall security plugin, or implemented by your host.

DreamHost Glossary

CDN

CDN is an abbreviation for “Content Delivery Network”. It refers to a geographically-distributed network of web servers (and their data centers). The entities that make up a CDN collaborate to ensure speedy content delivery via the internet.

Read More

If you’re using Cloudflare, you can check to see if there are any reported issues. For example, the server might be undergoing scheduled maintenance:

Cloudflare System Status

If maintenance isn’t the issue, you can also try deactivating both your CDN and firewall through your host’s control panel. Since all hosts do not use the same control panel, it’s recommended that you contact them for assistance.

8. Restart PHP And Increase Your PHP Limits

The 502 Gateway Error could also be caused by a PHP timeout issue. This happens when the PHP process takes longer than the maximum load time and the request timed out.

Restarting PHP may help resolve your connectivity issues. Most hosts provide an option to restart your services via your control panel but if you don’t see that, you may want to ask them to do this for you.

Unfortunately, changing your server’s max_execution_time or max_input_time values may be necessary. By default, WordPress has these values set to 300 seconds, but you can increase PHP execution time via your host’s control panel, or reaching out to their technical support and asking them to do it for you.

9. Contact Your Hosting Provider

If you’ve been through the previous steps and nothing has helped, it’s time to consider contacting your hosting provider. There may be a server issue that’s affecting your site. Unfortunately, if that’s the case, there’s nothing you can do except wait for them to fix it.

Additionally, they may be able to identify the source of your 502 Bad Gateway error and walk you through a solution. Many hosts offer 24/7 support via chat and should be able to resolve the issue quickly.

Solve The 502 Bad Gateway Error

The 502 Gateway Error is typically caused by a problem at the server. For instance, it may have experienced a spike in traffic that’s affecting performance and availability. However, the error could also be triggered by plugin conflicts and updates.

To troubleshoot the problem, start by clearing your browser cache and local DNS cache to rule out any issues on your end. Then, you can try disabling your plugins, themes, CDN, and firewall. If you’re still experiencing problems, consider contacting your hosting provider for assistance.

If you’re on a shared hosting plan, your 502 error may be because of another website’s traffic spikes. DreamHost offers VPS hosting that provides you with isolated resources and better performance, giving you more control and room to grow. Learn more about our VPS Hosting plans.

Ad background image

We Know You've Got Lots of VPS Options

Here’s how DreamHost’s VPS offering stands apart: 24/7 customer support, an intuitive panel, scalable RAM, unlimited bandwidth, unlimited hosting domains, and SSD storage.

Change Your VPS Plan

The post 502 Bad Gateway Error: What It Is and How to Fix It appeared first on Website Guides, Tips & Knowledge.

]]>
403 Forbidden Error: What It Means & 11 Ways To Fix It Fast https://www.dreamhost.com/blog/how-to-fix-403-forbidden-error-wordpress/ Thu, 12 Oct 2023 14:00:00 +0000 https://dhblog.dream.press/blog/?p=31217 Trespassing is illegal. But, if you’re encountering the 403 Forbidden error, you’re probably not trying to break into some sort of a top-secret black site. The 403 Forbidden error typically occurs when you’re trying to log in to WordPress or visit a specific page, but can’t. This can be incredibly frustrating. Fortunately, there are a […]

The post 403 Forbidden Error: What It Means & 11 Ways To Fix It Fast appeared first on Website Guides, Tips & Knowledge.

]]>
Trespassing is illegal. But, if you’re encountering the 403 Forbidden error, you’re probably not trying to break into some sort of a top-secret black site.

The 403 Forbidden error typically occurs when you’re trying to log in to WordPress or visit a specific page, but can’t. This can be incredibly frustrating.

Fortunately, there are a few simple fixes for this common WordPress error. Depending on your hosting plan, you may even be able to resolve the issue with help from your web host.

In this post, we’ll take a closer look at the 403 Forbidden error and its main causes. We’ll then show you 11 ways to fix it.

Get Content Delivered Straight to Your Inbox

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

What Is The 403 Forbidden Error?

The 403 Forbidden error means that your server thinks you do not have the required permission to access that particular page. This is usually caused by an issue with file permissions, but could be caused by another problem related to hosting or authentication.

The 403 Forbidden error typically appears when you’re trying to log in to your WordPress admin area or when visiting a specific page on your site. You may also encounter it while installing WordPress.

It’s one of several HTTP status codes used by servers to communicate with your browser.

The error is usually accompanied by one of the following messages (or similar variations):

  • “HTTP 403 Forbidden – Access to this resource on the server is denied.”
  • “HTTP Error 403 – Forbidden.”
  • “Forbidden – You don’t have permission to access [directory name] on this server.”
  • “You are not authorized to view this page.”
  • “It appears you don’t have permission to access this page.”
  • “403. That’s an error. Your client does not have permission to get URL [address] from this server.”

Instead of the “403 Forbidden” status, you might come across a simple notification that says “Access Denied.” It is also possible that you will get the following message: “Access to [domain name] was denied. You don’t have authorization to view this page.”

What Causes The 403 Forbidden Error?

There are several possible causes of the 403 Forbidden error code but the most likely one is an incorrect file permission on your server.

DreamHost Glossary

File Permissions

File permissions are rules that govern which user roles can carry out which interactions with specific files and directories within a filing system, network, or device.

Read More

This means that one or more files the browser is trying to access are not accessible because of their permissions.

Permissions directives determine who can view and modify the files on your website and your web server. They protect your files from outside tampering. But, in some cases, if misconfigured, they can prevent your site from working correctly.

However, this error can also be triggered by a faulty plugin or a corrupt .htaccess file.

DreamHost Glossary

.htaccess

’.htaccess’ is a configuration file used by the Apache web server software. The .htaccess file contains directives (instructions) that tell Apache how to behave for a particular website or directory.

Read More

In most cases, you should be able to resolve the issue on your own. However, you might also need to get in touch with your hosting provider to access or change some settings on your site.

11 Ways To Fix The 403 Forbidden Error In WordPress

Now, let’s go through a few ways you can fix the 403 Forbidden error.

First, we recommend that you make a backup of your site just in case something goes wrong and you need to restore it to an earlier version.

We’ll explore some common causes and how to fix the problem:

  1. Check the URL
  2. Perform a Hard) Refresh
  3. Clear Browser Cache
  4. Disconnect from VPN
  5. Check Index Page
  6. Change Your File Permissions
  7. Deactivate Your Plugins
  8. Delete and Restore the .htaccess File
  9. Deactivate Your CDN
  10. Check Hotlink Protection
  11. Contact Your Web Host

1. Check The URL And (Hard) Refresh

Before we delve deeper, let’s make an assumption – you’re operating on a private Wi-Fi network. It’s important to note that public networks often have different firewall rules that may prevent you from accessing your website.

With our Wi-Fi network disclaimers out of the way, let’s really begin.

First, double-check the URL that you’re typing into your web browser and make sure that it’s pointing to the correct website and web page.

Sometimes, a small mistype in the web address can trigger an error, or a broken link on your website could have sent you to a page that doesn’t exist, triggering the 403 error.

If the URL looks correct and there are no problems with its structure, format, or spelling, then we’ll move onto refreshing the page.

2. Perform A (Hard) Refresh

Next, try refreshing the page.

In most browsers like Google Chrome, you can do this by simply clicking on the address bar to highlight the address. Then press “Enter.”

If refreshing doesn’t help, then let’s try a “Hard” refresh.

This is a simple trick that clears your browser’s cache for the specific page you’re trying to access. This forces the browser to download the latest version of the page and might fix the issue.

DreamHost Glossary

Cache

A cache is a temporary data storage layer that is designed to improve data access speeds by reducing the time needed to read and write data from a permanent data storage location.

Read More

To perform a hard refresh in Google Chrome: Open the page and press Cmd + Shift + R.

The page should refresh and you can see if this solved the problem.

If not, then let’s take it to the next step.

3. Clear Browser Cache

Website errors are either caused by server-side problems (issues with the website, server, or configuration) or client-side problems (issues with the browser or user’s device, settings, etc).

Your browser cache is one client-side problem that can cause many unexpected issues.

Luckily it’s easy to fix. You just clear the cache to force your browser to fully fetch content from the pages you’re trying to visit.

Follow these instructions to clear your browser’s cache.

Nerd note: If this doesn’t work and you really want to be sure it’s not a caching issue, you can try flushing your DNS cache, too. Just to be safe.

4. Disconnect From VPN

VPNs (Virtual Private Networks) are great for masking your location and protecting your privacy online. Because they route your internet activity through somewhere other than your actual location, they also change your IP address.

This is good for privacy, but it can create access and permissions issues on certain websites.

If you’re using a VPN, try disabling it and then repeating the above steps.

5. Check Index Page

Now we’re going to dig in a bit further and start diagnosing potential problems with your website files, permissions settings, and other problems that may give rise to the 403 error.

Most websites, including WordPress sites, expect your homepage to have a specific file name by default.

Unless otherwise specified, the site will look for a file named something like:

  • Index.php
  • Index.html

If the page is missing, you’ll likely have issues.

Before we start adjusting file permissions, let’s just make sure that your homepage file is intact and correctly named.

To do this, you’ll need to take one to two steps:

  1. Connect to your site with a Secure File Transfer Protocol (S/FTP) client, such as FileZilla
  2. Access your site through the file manager in your hosting account

If you have a DreamHost account, this guide from our knowledge base will walk you through accessing and utilizing the built-in file manager.

Whether you access your files through S/FTP or a file manager, you need to look for your “index” file.

Inside your root directory, you’ll likely find a folder called something like “myexamplesite.com” (If you’re a DreamPress user, the folder will be called “{YOURSITE}.dream.press”.)

This is the main folder that contains all of your website’s files.

Open it and look for a file called either “index.html” or “index.php”.

If you’re using WordPress, then you may need to take a few extra steps. Navigate to wp-content > themes > {YOUR THEME}. The index file for your specific site theme should live in this folder.

If you find an index.php or index.html file, then this is unlikely to be causing your 403 error.

If you can’t find an index file, then this could be the issue that’s generating the 403 error.

Start by creating and uploading a blank “index.html” or “index.php” file into the relevant folder.

Then go try your website again, performing a hard refresh.

You probably won’t see your website, but if you see a blank screen rather than the 403 error, then it’s likely that you’ve found the problem.

At this point, you’ll probably want to try contacting your web host for help. Alternatively, roll back your website to a previous backup version before the problem occurred.

If you’re using WordPress, you could consider installing WordPress again. (This will wipe out your settings, themes, and plugins, but it shouldn’t impact the content and files you’ve added to your database.)

6. Change Your File Permissions

Every WordPress file on your site’s server has its own access permissions. These settings control who can access and modify its contents. If these files have incorrect permissions, your server will stop you from accessing them.

As we covered in the last section, you can access your website either through S/FTP client or a file manager app. Once you do so, you’ll need to find your “public_html” folder or whichever folder contains all of your website files in the directory browsing window.

Then, right-click on it and choose File Attributes.

Public File, File Attributes

In the popup window, locate the Numeric field and enter “755” or “750” in the value box. Then select the “Recurse into subdirectories” and “Apply to directories only” options, and click on “OK.”

File Attributes, Apply to directories only

So far, you’ve applied the correct folder permissions just for your directories. You’ll now do the same thing for your files.

To start, right-click on your public_html folder and select File Attributes. This time, you’ll need to type “644” in the Numeric value field. Then choose Recurse into subdirectories, select Apply to files only, and click on OK.

File Attributes, Apply to files only

Nerd note: Your wp-config.php file requires a different numeric value than the ones stated here. This unique value prevents other users on your servers from accessing the file. Therefore, you’ll need to change its file permission manually.

In your root directory, find the wp-config.php file, right-click, and select File permissions. Next, set the numeric value to “440”, and click OK.

File permissions, Numeric value

Now, every one of your WordPress files and folders should have the correct permissions. Once you’ve completed the above steps, go back to your site and try to reproduce the 403 Forbidden error. If your site works fine, you don’t need to do anything else.

However, don’t worry if you’re still facing the same problem. There are still a few more fixes to try.

7. Deactivate Your WordPress Plugins

As we mentioned earlier, the 403 Forbidden error can also be caused by a faulty plugin. To determine if this is the case, you’ll need to deactivate your plugins and then reactivate them individually.

To start, connect to your site via FileZilla or the file manager in your hosting account. Then, open the wp-content folder in your site’s root directory and locate the plugins folder. Right-click on the plugins folder and select Rename.

Rename plugins

Next, give the folder a new name, for example, “plugins_test”. This will automatically deactivate all of your plugins.

If you can access your site after renaming the folder, then the 403 Forbidden error was caused by a glitchy plugin. Your next step is to find out which one it is.

First, return to your site’s root directory and rename the plugins folder back to “plugins”. Then, navigate to the Plugins page in your WordPress dashboard and activate the plugins one at a time. Keep doing this until you are able to reproduce the error.

Once you’ve identified the faulty plugin, you can either remove it or contact its developer for support.

8. Delete And Restore The .htaccess File

A corrupt or misconfigured .htaccess file can also trigger the 403 Forbidden error. This file is located in your site’s root directory and enables WordPress to interact with your server.

.htaccess is a file used on Apache web servers. It contains rules and directives about your website. If it becomes corrupted or misconfigured, it can create problems like the 403 error (among other things).

How do you fix it?

Inside your site’s root directory, locate the .htaccess file, right-click on it, and choose Delete.

Delete .htaccess

Now, try accessing your site again. If the 403 Forbidden error has disappeared, then your .htaccess file may have been corrupted. This means you’ll need to create a new one.

To do this, navigate to Settings in your WordPress dashboard and select Permalinks. Then click on the Save Changes button at the bottom of the page, and a new .htaccess file will be generated. You can look for the file in your site’s directory to ensure that it has been restored.

9. Deactivate Your CDN

If you’re still getting the 403 Forbidden error after completing the above steps, you may have a problem with your Content Delivery Network (CDN). This is a network of servers located in different parts of the world, with each server hosting a copy of your website. Many hosting plans come with a CDN to help boost your site’s performance.

DreamHost Glossary

CDN

CDN is an abbreviation for “Content Delivery Network”. It refers to a geographically-distributed network of web servers (and their data centers). The entities that make up a CDN collaborate to ensure speedy content delivery via the internet.

Read More

To see if your CDN is the cause of the error, you’ll need to temporarily disable it. You can do this by logging into your hosting account and locating your CDN settings. If you’re unable to access your CDN, we recommend getting in touch with your hosting provider.

10. Check Your Hotlink Protection

Finally, you might want to check your site’s hotlink protection.

Hotlinking is when someone embeds media files on their site by linking them directly from another site. Some individuals may do this to use another site owner’s bandwidth (rather than their own), which is effectively theft.

Some hosts and CDN providers offer hotlink protection.

However, if this is not set up properly, it can trigger a 403 Forbidden error on your site.

Therefore, you may want to contact your web host about this issue. While you may want to look into this yourself, it’s best to get help from a technical expert to ensure that your hotlink protection is configured correctly.

11. Contact Your Web Host

If all else fails, ask for help.

Your website hosting company’s support team should be able to provide additional steps and ideas for troubleshooting this issue.

In some cases, it could be triggered by a server configuration problem, changes to the DNS, or even malware or other website attacks.

Additional WordPress Resources

If you’re new to WordPress, you’re bound to run into some technical issues while setting up your site. To help you fix some of the most common WordPress errors, we’ve put together several how-to guides:

Meanwhile, if you’re looking for more WordPress tips and hacks, check out our WordPress Tutorials. This collection of guides will help you set up and design your first WordPress site like a professional.

Get Content Delivered Straight to Your Inbox

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

The post 403 Forbidden Error: What It Means & 11 Ways To Fix It Fast appeared first on Website Guides, Tips & Knowledge.

]]>
How to Fix the WordPress 404 Not Found Error https://www.dreamhost.com/blog/how-to-fix-wordpress-404-error/ Tue, 10 Oct 2023 14:00:00 +0000 https://dhblog.dream.press/blog/?p=29912 You’ve likely seen the “Page Not Found” error before. Unfortunately, if you operate a website of any sort (WordPress or not), the day will probably come when you see the message on one of your own pages. Fortunately, like many common WordPress errors, 404s are relatively easy to troubleshoot and fix. The solution usually involves […]

The post How to Fix the WordPress 404 Not Found Error appeared first on Website Guides, Tips & Knowledge.

]]>
You’ve likely seen the “Page Not Found” error before.

Unfortunately, if you operate a website of any sort (WordPress or not), the day will probably come when you see the message on one of your own pages.

Fortunately, like many common WordPress errors, 404s are relatively easy to troubleshoot and fix. The solution usually involves restoring your site’s permalink structure — something you can do in just a few minutes.

In this article, we’ll explain just what a 404 error is and what can cause one on your site. Then, we’ll walk you through how to fix it in four simple steps.

Let’s get started!

An Overview Of The WordPress 404 Error

A 404 error, also known as a “Page Not Found” error, indicates that your browser can’t locate the page you’re trying to access.

The exact message can look a bit different depending on the browser you’re using, but it will generally always contain either the “404” code or a “page not found” message of some kind.

Website owners can also create their own custom 404 Not Found pages. For example, here’s what our (very cool, we might add) 404 page looks like:

404 Error Message

Seeing this notification (or any other error message) when trying to access your site can be frustrating. While there is a chance that your post has actually gone missing, the vast majority of the time, there’s a more benign cause.

Some common reasons WordPress posts might return 404 errors include:

  • A mistyped URL – It could simply be attributed to a typo in the URL. This is the most common cause.
  • An issue with your Domain Name System (DNS) settings – If you’ve recently updated any of your DNS information and see this error, it could be because the changes haven’t propagated fully. It can take up to 48 hours for this process to complete.
  • Problems with add-ons or the structure of your site – WordPress permalink problems can be caused by a missing, broken, or corrupted .htaccess PHP file. Compatibility issues with WordPress components, such as plugins and themes, could also be the culprit.
DreamHost Glossary

DNS

The Domain Name System (DNS) protocol keeps records of which domain names correspond to specific IP addresses. This system enables you to browse the web by typing in regular URLs instead of IP addresses.

Read More

Regardless of the cause, this error prevents access to your site and can scare off users and potential customers. So, it needs to be resolved as quickly as possible. This is why, shortly, we’ll walk through troubleshooting and resolving the most common causes behind the WordPress 404 error.

Get Content Delivered Straight to Your Inbox

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

Why 404 Errors Matter

404 errors pose several problems for a website beyond simply preventing you from accessing pages.

First, they create a poor user experience (UX).

When you land on a page that doesn’t have what you were looking for — or much of anything for that matter — what do you do?

You leave. Go back to the search engine — And possibly avoid clicking on anything from that site again due to lack of trust.

If there are even a few of these errors on your site, they can absolutely turn away users (and potential buyers.)

In the worst-case scenario, those visitors could land on a competing website instead, costing you business.

Additionally, 404 errors can also hurt your search engine optimization (SEO). Search engine crawlers won’t index a page that returns a 404 because they think it doesn’t exist.

Get enough of these non-existent pages on your website, and you’ll start training search engines that your site is full of low-value content. You’ll begin to trail after your competitors in the search engine results pages (SERPs).

This matters because SEO is the primary driver of traffic to websites.

SEO Accounts For Majority of Website Traffic

What To Do *Before* Troubleshooting The WordPress 404 Error

Worried about scaring off leads and search engines?

We’re here to help — but don’t do anything in a rush!

Just before you dive into changing your permalink settings or accessing your .htaccess file, it’s a smart idea to create a backup of your website and database. This way, if you accidentally make something worse, you can easily restore your site to a functioning state.

If your WordPress website is hosted with DreamHost, backups couldn’t be easier.

We offer easy one-click backups for every customer. And with one of our managed WordPress hosting plans, daily backups are automatic — so you’ll always have a fresh copy to access.

You can also create a manual backup by following our guide to How to Back Up Your WordPress Website.

 

Related: How to Choose a Web Hosting Provider — 15-Point Checklist

How To Fix WordPress Posts Returning 404 Error (4 Steps)

With a fresh backup of your site in hand, it’s time to get to work solving your problem.

Tip: The best way to navigate this step-by-step guide is to follow it in order, enacting each change in order and checking if the error has been resolved after each one.

Step 1: Reset Your WordPress Permalinks

The first step to try is resetting your permalinks.

Head to your WordPress dashboard and navigate to Settings > Permalinks.

Permalinks

From here, just click on Save Changes at the bottom of the screen.

Seriously, that’s it.

You don’t actually need to edit anything. Clicking that button will update the permalink settings even if you don’t make any changes. This is important because it also refreshes the rewrite rules used for “pretty permalinks.” Without these rules that resolve pretty permalinks, any pages that use them would display the 404 Page Not found error.

With this done, go ahead and reload the pages you were trying to access. If everything works, you’re all done!

If you still get a 404 error, head to the next step.

Step 2: Restore Your .htaccess File

If resetting your permalinks didn’t work, the next strategy is restoring your .htaccess file. This controls how WordPress interacts with the web server and how it generates permalinks for your pages. Restoring it to the default settings can fix sudden 404 errors.

DreamHost Glossary

.htaccess

'.htaccess' is a configuration file used by the Apache web server software. The .htaccess file contains directives (instructions) that tell Apache how to behave for a particular website or directory.

Read More

To restore the .htaccess file, you’ll need to open it up and make some simple edits. There are a few ways to do this.

You can use a Secure File Transfer Protocol (SFTP) client, such as FileZilla. We have detailed instructions for connecting via SFTP if you need help.

If you’re using DreamHost, you can use the built-in file manager. This guide from our knowledge base will walk you through accessing and utilizing the DreamHost file manager.

Once you have the file manager open, select the folder that corresponds to your domain name. You’ll find the .htaccess file inside (if you see items such as “wp-content,” you’re in the right place!)

Just in case anything goes wrong, first copy the current contents of the .htaccess file and paste them somewhere for safekeeping.

Then, replace the contents of the .htaccess file with the following:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

This is the default .htaccess code for WordPress. Once you’ve pasted this in and saved your changes, your restoration is almost complete!

We say almost because restoring this file will also reset the permalink settings for your WordPress site. Therefore, if you’re using a custom permalink structure (or have changed it at all from the default), you now need to restore those settings.

To do so, head back to your WordPress dashboard and navigate to Settings > Permalinks (just like step 1 above). Restore your preferred settings then Save Changes.

Finally, refresh your website and attempt to load the pages that were returning 404 errors.

If everything works now, congratulations!

If not, proceed again to the next step.

Step 3: Disable Your WordPress Plugins And Theme

If you’ve reset your permalinks and .htaccess file but you’re still seeing 404 errors on your site, the next step is to check your WordPress theme and plugins.

Plugins, in particular, can sometimes have bugs or compatibility issues that prevent a site from loading.

So, let’s start there.

The basic idea is to disable them one by one, checking on those 404s each time. If the error persists, turn it back on and move to the next one.

To get started, head to your WordPress dashboard and navigate to Plugins > Installed Plugins.

Installed Plugins

Locate and click the Deactivate button associated with the top active plugin on the screen. (Active plugins should have a blue background. Inactive ones should have a white background and no option to deactivate.)

Deactivate

Now, refresh your site and see if the 404 error is still occurring.

If you get the dreaded error message, head back to the plugins, re-activate the one you just tried, and move to the next active one on the list.

If you find one that resolves the issue, you can check if the plugin has an update that may resolve the problem. If updating it and then refreshing one more time doesn’t work, look for an alternative plugin with similar functionality.

But if none of the plugins prove to be the issue, it’s time to try changing your WordPress theme.

To do that, head to Appearance > Themes.

How To Use WordPress Theme Editor, Choose Your Theme

Your currently-active theme is marked as such. Hover over one of the others and click on Activate. Then, refresh your site and try to access the problematic page again.

Note that changing your theme can alter your site significantly. Additionally, if you’ve made any edits to your theme, those can be lost if your theme is changed or even updated. So, again, spend some time backing up your site before you go clicking around inside your themes.

If you end up finding that it’s your theme that’s the issue, you may need to spend some time finding one that provides a similar look and features.

Need help? Check out 18 Pro Tips For Choosing The Perfect WordPress Theme.

Step 4 (Bonus): Set Up A 301 Redirect For Moved Content

Just in case you do need to move content to a new URL and don’t want the old one to throw a 404 error, here’s one final step.

You’ll want to set up some 301 redirects to point that old URL to the new one.

The easiest way to do this is with the Redirection plugin. This tool will enable you to quickly set up the redirects you need. Plus, it’s free and user-friendly.

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

How To Create Your Own “Error 404 Not Found” Page

If you want to set up your own custom 404 error page, you can do so relatively easily.

The 404page plugin is a very popular option for quickly creating a custom error page.

Or, you can take a more hands-on approach and do it manually. This is still pretty simple and only requires adding one line of code to the .htaccess file (accessed via your file manager, like in step 2 above) to target the error to a specific page. Then, you just have to create that new page.

We have full instructions for setting up custom error pages to walk you through the process.

Tools To Help You Monitor 404 Errors Moving Forward

Finally, if you want to keep an eye out for 404 errors in the future, you can do so with a few handy tools.

If you’re using Google Analytics to understand website traffic, you can also use it to find 404 errors on your site. Databox has a guide on how.

Google Search Console will also show you crawl errors that the Google bots have come across as they indexed your site. This is a simple way to see all the issues Google is encountering.

You can also enter your URL into a specialized tool such as the Broken Link Checker, which will scan your entire site for broken links and let you know if it finds a 404 page. It’s free and easy to use.

More WordPress Error Tutorials

Want to learn how to fix other common WordPress errors? We’ve created a robust series of guides to help!

Check ‘em out:

Let Us Handle Those WordPress 404 Errors

A 404 error can be frustrating — especially when it happens on your own site.

These messages cause problems with SEO and ruin your site’s UX. Fortunately, they’re not too difficult to resolve.

Fixing 404 web pages generally involves restoring your site’s permalink structure and setting up redirects for any posts that are actually gone. You can then use tools, such as Google Search Console, to monitor your site for future 404s.

If you want to spend less time dealing with errors, consider switching to managed WordPress hosting from DreamHost.

You can engage our Development Pro Services teams on a retainer or on-demand basis to take website management off your page, so you can get back to business!

Ad background image

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.

Check Out Plans

The post How to Fix the WordPress 404 Not Found Error appeared first on Website Guides, Tips & Knowledge.

]]>