Redirects do not work if port 80 is not enabled in ufw?

Posted May 18, 2017 2.5k views
NetworkingUbuntu 16.04

I’ve changed my ufw settings to only allow port 22 for ssh and 443 for https.

If i go to it works fine but if i try to go to then it says server not found. I take it i have no choice BUT to enable port 80?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


At minimum, you need ports 22, 80, and 443 open and accepting incoming requests. Ports 80 and 443 are web-facing ports that are required for HTTP and HTTPS requests to get through.

  • dang, alright. And if i want to receive emails then 25 will also need to be open. Anything else i’ve probably need?

    • @ariziragoran

      You’ll have to open any port which is to be used as an incoming port that a connection needs to be accepted on. If you need to accept connections on 25, you’ll need to open it as well.

      Keep in mind, if your account is rather new, DigitalOcean does place a block on 25, IIRC. So unless that block has been removed for your account, it won’t matter if you open it on the Droplet, it’ll be blocked at the network level so the connection will drop.

      You’ll have to get in touch with support to have the block removed.