How to Fix the “421 Misdirected Request” Error (Nginx, Apache, Plesk)

July 17, 2025

Your Website Is Down with a “421 Misdirected Request” Error. Here’s Why.

Woke up this morning to find your website suddenly offline? If you’re seeing a “421 Misdirected Request” error, you’re in the right place. This issue is affecting a huge number of servers globally, typically those using Nginx as a reverse proxy in front of Apache—a very common setup for Plesk on Ubuntu 22.04.

The problem isn’t your fault. It was triggered by a recent security update to Apache that changed how it handles SSL/TLS connections. Don’t worry, this guide provides three clear methods to fix the error and get your site back online immediately.

 

What is the “421 Misdirected Request” Error?

In simple terms, this error is an SSL handshake failure. Your user’s browser tries to connect securely to your website via Nginx. Nginx then tries to pass this connection to the Apache backend.

However, due to the recent Apache update (version 2.4.58-1ubuntu8.6), Apache now has stricter security rules. It demands to know the exact hostname of the site it’s serving via a technology called SNI (Server Name Indication). Because Nginx wasn’t forwarding this specific piece of information, Apache rejects the connection, resulting in the “421” error.

The fix is to tell Nginx to correctly pass this SNI information to Apache.

421 Misdirected Request - Picture of server

🔧 3 Fast Methods to Fix the “421 Misdirected Request” Error

Before You Begin: A Quick Precaution

The methods below involve editing your server’s core configuration files. It is always highly recommended to have a recent, full server backup before making these kinds of changes.

While this is a well-documented solution for this specific issue, every server environment can have unique configurations. Please read through the steps carefully to ensure you are comfortable with them before proceeding.

Plesk have posted method 2 below in their support articles here.

Method 1: The Plesk GUI (Recommended for Plesk Users)

 

This is the safest and easiest method if your server is managed by Plesk, as it avoids the command line entirely.

  1. Log in to your Plesk panel.
  2. Go to Tools & Settings in the left-hand menu.
  3. Under the “General Settings” group, click on Apache & Nginx Settings.
  4. Scroll down to find the text box labeled Additional Nginx directives.
  5. Paste the following two lines into that box:
    proxy_ssl_server_name on;
    proxy_ssl_name $host;
    
  6. Click OK or Apply. Plesk will automatically save the configuration and restart Nginx. Your websites should now be back online.

Method 2: The One-Line Command (Fastest for CLI Users)

 

This method is for experienced users who are comfortable on the command line and want the quickest possible fix.

  1. Connect to your server via SSH.
  2. Execute the following single command. It will create the necessary file and restart Nginx in one step.
    echo -e "proxy_ssl_server_name on;\nproxy_ssl_name \$host;" > /etc/nginx/conf.d/fixssl.conf && service nginx restart
    
  3. After the command completes, your sites should be back online.

Method 3: Manual File Creation (The Cautious CLI Approach)

 

This method achieves the same result as Method 2, but allows you to manually create and edit the file, which some users prefer.

  1. Connect to your server via SSH.
  2. Open a new configuration file using a text editor like nano:
    sudo nano /etc/nginx/conf.d/fixssl.conf
    
  3. Paste the following two lines into the empty file:
    proxy_ssl_server_name on;
    proxy_ssl_name $host;
    
  4. Save the file and exit the editor by pressing Ctrl+X, then Y, then Enter.
  5. Finally, test your Nginx configuration to ensure there are no errors, then restart the service:
    sudo nginx -t && sudo systemctl restart nginx
    
  6. If the test is successful, Nginx will restart, and your sites will be back online.

How Black Sheep Support Can Help

Solving complex technical problems like this is a crucial part of managing a digital presence, but it’s just one piece of the puzzle. At Black Sheep Support, we partner with businesses to ensure their entire digital strategy is robust, secure, and aligned with their long-term goals.

While you’re handling the immediate technical fixes, we focus on the bigger picture:

  • Strategic Technology Consulting: We help you navigate the complex digital landscape, ensuring you have the right technology and processes in place for sustainable growth.

  • Proactive Risk Management: We help you identify potential technical and security vulnerabilities across your digital ecosystem before they become critical problems.

  • Process & Policy Development: We assist in creating clear internal policies that empower your team to use technology safely and effectively.

  • Data Security & Compliance: We provide guidance on ensuring your data handling practices are secure and compliant, minimising business risk.

To get started, we offer a free consultation where we’ll review your current setup and tailor a strategy that balances strong security with effective AI use.

Contact Black Sheep Support today to protect your sensitive information and confidently harness the power of AI—without the fear of accidental data leaks.

Is this Apache Nginx fix for the 421 error a permanent solution?

L
K

Yes. The Nginx configuration change should be permanent and correctly aligns your server with Apache’s new, stricter security standards. However Apache could decide to rollback or provide an adjusted patch due to the number of sites affected.

Why did the recent Apache update cause a "421 Misdirected Request" error?

L
K

The error was triggered by a specific Apache security update (version 2.4.58-1ubuntu8.6). If your server has automatic updates enabled, it was likely installed overnight without manual intervention, causing the error to appear suddenly.

What happens if I remove the Nginx configuration fix?

L
K

You can remove the configuration file or the directives from the Plesk GUI and restart Nginx. However, this is not recommended as the “421 Misdirected Request” error will immediately return.

Does fixing the Nginx SNI issue affect my server's security?

L
K

No, quite the opposite. This fix improves your server’s security posture by ensuring it correctly handles modern SSL/TLS protocols as required by the latest version of Apache.

The fix didn't work, what else can cause a "421 Misdirected Request" error?

L
K

Server configurations can be complex. If this solution didn’t resolve the issue, it could be caused by another misconfiguration in your setup. This is a good time to contact a professional, as our team at Black Sheep Support can provide expert assistance to diagnose the unique cause of the problem.