---
title: "Can’t connect to host “ssl://localhost:993” on  Cyberpanel"
description: "![](https://truehost.com/support/wp-content/uploads/2025/01/image-132.png) When working with CyberPanel, you may encounter the error when you try to access snappymail : Server Message **\"Can’t connect to host 'ssl://localhost:993'\"**. This error typically occurs due to a misconfiguration in your server's network settings. Specifically, the issue often…"
url: "https://truehost.com/support/knowledge-base/cant-connect-to-host-ssl-localhost993-on-cyberpanel/"
updated: "2025-04-09"
category: Cyberpanel
---

# Can’t connect to host “ssl://localhost:993” on  Cyberpanel

![](https://truehost.com/support/wp-content/uploads/2025/01/image-132.png)

When working with CyberPanel, you may encounter the error when you try to access snappymail : Server Message **"Can’t connect to host 'ssl://localhost:993'"**. This error typically occurs due to a misconfiguration in your server's network settings.

Specifically, the issue often lies in one of two critical files: `/etc/hosts` or `/etc/resolv.conf`. Below, we’ll walk you through the steps to resolve this error by checking and correcting the configurations in these files.

---

## **Step 1: Check and Configure the `/etc/hosts` File**

The `/etc/hosts` file maps hostnames to IP addresses on your local machine. If this file is misconfigured, your server may fail to resolve `localhost` correctly, leading to the error.

1. **Access Your Server via SSH**
   Use an SSH client (e.g., PuTTY or Terminal) to log in to your server.
2. **Open the `/etc/hosts` File**
   Use a text editor like `nano` or `vim` to open the file: ***`sudo nano /etc/hosts`***
3. **Verify the Configuration**
   Ensure the file contains the following line: `127.0.0.1 localhost` or your ***`server.domain.com`*** If this line is missing or incorrect, add or modify it as shown above.
4. **Save and Exit**
   Save the changes and exit the editor. In `nano`, you can do this by pressing `CTRL + X`, then `Y`, and `Enter`.
5. Final Output should be something similar to attached image.

---

![](https://truehost.com/support/wp-content/uploads/2025/01/image-133-1024x129.png)

## **Step 2: Check and Configure the `/etc/resolv.conf` File**

The `/etc/resolv.conf` file contains DNS resolver information. If this file is misconfigured, your server may fail to resolve domain names, including `localhost`.

1. **Open the `/etc/resolv.conf` File**
   Use a text editor to open the file: nano***`/etc/resolv.conf`***
2. **Add a Public DNS Server**
   To ensure proper DNS resolution, add a public DNS server like Google’s: ***`nameserver 8.8.8.8 , nameserver 8.8.4.4`*** or Cloudflare ***`nameserver 1.1.1.1`*** If the file already contains other `nameserver` entries, you can replace them .
3. **Save and Exit**
   Save the changes and exit the editor.
4. Final Output should be something similar to attached image.

![](https://truehost.com/support/wp-content/uploads/2025/01/image-134.png)

---

## **Step 3: Verify the Fix**

After making the above changes, restart ***`dovecot`*** and check if the error is resolved. If the configurations were correct, the error **"Can’t connect to host 'ssl://localhost:993'"** should no longer occur.

---

![](https://truehost.com/support/wp-content/uploads/2025/01/image-135-1024x237.png)

Access Snappymail.

![](https://truehost.com/support/wp-content/uploads/2025/01/image-136-1024x261.png)

##

---

By following these steps, you should be able to resolve the **"Can’t connect to host 'ssl://localhost:993'"** error in CyberPanel.

That's all. Happy Hosting.
