Hostxpeed
Login Get Started →
Getting Started

How to Allow HTTP/HTTPS in UFW

2 min read
34 views
Jun 10, 2026

Prerequisites

Before allowing web traffic, make sure you have:

  • SSH access to your VPS
  • Root or sudo privileges

Allow HTTP (Port 80)

Connect to your VPS:

ssh hxroot@YOUR_SERVER_IP -p 22
sudo ufw allow http

Or explicitly:

sudo ufw allow 80/tcp

Allow HTTPS (Port 443)

sudo ufw allow https

Or:

sudo ufw allow 443/tcp

Allow Both at Once

sudo ufw allow 80,443/tcp

Verify

sudo ufw status

✅ Web traffic is now allowed through the firewall.

Was this article helpful?