---
title: "Secure WebSocket (WSS)"
canonical_url: "https://www.zone.lv/help/kb/secure-websocket-wss-2/"
post_type: "ht_kb"
published: "2024-04-18T11:55:32+00:00"
modified: "2025-01-10T09:07:30+00:00"
language: "en"
author: "Tanel"
taxonomies:
  ht_kb_category:
    - name: "Apache"
      url: "https://www.zone.lv/help/kb-categories/apache-en/"
    - name: "Node.js"
      url: "https://www.zone.lv/help/kb-categories/nodejs-en/"
  ht_kb_tag:
    - name: "nodejs"
      url: "https://www.zone.lv/help/kb-tags/nodejs-en/"
    - name: "websocket"
      url: "https://www.zone.lv/help/kb-tags/websocket-en/"
---

# 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 control panel under [System Information](https://my.zone.lv/hosting/webhost/server-info).
