Fix "The WebSocket handshake failed" in Terminal
cPanel's Terminal fails when reached through a proxy subdomain. Use one of the addresses that connects directly.
cPanel's Terminal shows:
Error: The WebSocket handshake failedApplies to shared, reseller and Premium hosting.
Why it happens
Terminal needs a WebSocket connection, which is a long-lived upgraded HTTP connection rather than an ordinary request.
Reaching cPanel through a proxy subdomain such as https://cpanel.example.com
routes that connection through the web server, which does not pass the upgrade
through. The page loads; the terminal cannot connect.
Use a direct address instead
Any of these connect to cPanel directly:
| Address | Notes |
|---|---|
https://example.com:2083 | Port 2083 is cPanel directly. Most reliable |
https://server-hostname:2083 | Works even if the domain does not point here |
https://example.com/cpanel | Usually works |
Sign in again at one of those and open Terminal.
If you are behind Cloudflare, use the server hostname on port 2083. Cloudflare does not proxy port 2083, so the connection goes straight to the server — and Cloudflare's own proxy is a second thing that can interfere with WebSockets.
If it still fails
- A corporate network blocking port 2083. Try another connection.
- A browser extension interfering. Test in a private window with extensions disabled.
- Shell access not enabled on the account. Terminal requires it — see Connect over SSH.
Or just use SSH
Terminal is convenient but limited — no clipboard integration, and the session ends with the page. For anything substantial, connect over SSH from your own machine instead: Connect over SSH.
Related
Convert a cPanel account to an addon domain
There is no tool for this. The manual procedure, the order that matters, and the parts that are irreversible.
Fix "Your IP address has changed"
cPanel ends your session when your IP changes. Why it happens on mobile connections, and how to stop it interrupting you.