Remove browser access to my droplet via IP address

I got a secure SSL domain name now and I would like to disable access to my server via the ip address via a browser.

Especially in order to remove access to phpmyadmin without SSL.

How can I do that ?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

If you want zero access to your droplet, and zero access for everyone else to your droplet via web browser, you will need to block port 80 and port 443 for good measure. If you are using Ubuntu, you can use UFW to accomplish this.

UFW deny http UFW deny https

Anything else will require someone else’s help.

If you just want to make sure all traffic is forced to use SSL, you will have to research HTTPS force for your web server.