WebGee DocsDocs
cPanel & Hosting
Free migration + 30-day money-backSee how

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 failed

Applies 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:

AddressNotes
https://example.com:2083Port 2083 is cPanel directly. Most reliable
https://server-hostname:2083Works even if the domain does not point here
https://example.com/cpanelUsually 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.

On this page

Hosted elsewhere?

Cloud Hosting

cPanel on NVMe storage, with LiteSpeed, free SSL and daily backups included.

See plansFree migration