---
title: "Secure WebSocket (WSS)"
canonical_url: "https://www.zone.eu/support/kb/secure-websocket-wss-2/"
post_type: "ht_kb"
published: "2024-04-18T11:55:32+00:00"
modified: "2024-10-03T13:00:15+00:00"
language: "en"
author: "Jarno"
taxonomies:
  ht_kb_category:
    - name: "Apache"
      url: "https://www.zone.eu/support/kb-categories/apache-en/"
    - name: "Node.js"
      url: "https://www.zone.eu/support/kb-categories/nodejs/"
  ht_kb_tag:
    - name: "nodejs"
      url: "https://www.zone.eu/support/kb-tags/nodejs/"
    - name: "websocket"
      url: "https://www.zone.eu/support/kb-tags/websocket/"
---

# Secure WebSocket (WSS)

The easiest way to use a secure websocket connection on the Zone virtual server platform is to connect through the Apache wstunnel module.

To do this, add the following line to the `.htaccess` file:

```
RewriteRule .* ws://127.x.x.x:3000%{REQUEST_URI} [P,QSA,L]

```

`3000` must be replaced by the port that the application is listening to.

`127.x.x.x` must be replaced with the correct loopback IP.

The loopback IP can be seen by typing `vs-<span class="search-highlight">loopback</span>-ip -4` in SSH shell or from My Zone environment under [System Information](https://eu.myzone.app/dashboard/en/webhosting/webhost/server-info).
