Why HTTPS alone won’t keep you safe on public WiFi

Posted on April 5th, 2019 by in Privacy & Security.

protonvpn vpn public wifi safe vpn


Most websites now use HTTPS to encrypt your connection and add an additional layer of protection to your data. But if you are on public WiFi, using HTTPS without a VPN means that some of your data will still be vulnerable.

Edit: An earlier version of this blog post could have been misunderstood as implying that TLS 1.2 has been broken. We have removed the section which can cause this confusion.

The Hypertext Transfer Protocol Secure, or HTTPS, encrypts the traffic between your device and a website, making it difficult for intruders to observe the information being shared. It also provides signatures, or HTTPS certificates, that allow you to verify that the site you are on is run by whom it claims it to be. HTTPS has become a standard security feature for nearly all websites.

If HTTPS encrypts your connection with a site, then isn’t public WiFi safe? Unfortunately, HTTPS does not encrypt all your data, like DNS queries. If you are using public WiFi without a VPN, you are putting yourself at risk.

How HTTPS works

HTTPS uses the Transport Layer Security (TLS) protocol to secure the connection between a web browser and a website. A protocol is simply a set of rules and instructions that govern how computers communicate with each other.  The TLS protocol is the backbone of securing online connections. It’s what allows you to enter your login credentials, browse websites, or perform online banking without others seeing the contents.

TLS uses private-key cryptography. A key is simply a code for computers involved in message transmission, and a private key is one that is not open to the public. To ensure the integrity of their connection, your browser and the Internet server initiate a “handshake” by sharing a public key. Once the handshake is established, the server and browser negotiate private keys to encrypt your connection. Each connection generates its own, unique private key, and the connection is encrypted before a single byte of data is transmitted. Once the encryption is in place, intruders cannot monitor or modify the communications between the web browser and website without being detected.

TLS also supplies digital certificates that authenticate the credentials of websites and let you know that the data is from a trusted source (or a site who claims to be one). A digital certificate is issued by a certification authority.

This system still has certain vulnerabilities, as we will discuss below, but it is considered secure. The first vulnerability that using public WiFi without a VPN exposes you to is the fact that TLS does not protect domain name system (DNS) queries (yet).

What is a DNS query?

The domain name system translates human-friendly URLs into numerical IP addresses that computers can understand. For example, to visit our site, you type in the URL https://protonvpn.com, but your computer sees it as []. To find this number, your web browser uses what is called a DNS resolver, which is usually supplied by your Internet service provider. Think of this resolver as a sidekick who scurries around translating the URL of the site you wish to visit into its IP address.

Your DNS request is not encrypted. An intruder can observe your DNS queries and your DNS resolver’s responses to them. This leads us to the first attack you could suffer if you use public WiFi without a VPN: DNS leaks.

DNS leak

If someone were to monitor your DNS queries, they would have a list of all the sites you visited along with your device’s IP address. Given the weak security of most public WiFi hotspots, it would be relatively simple for an intruder to gain access to the network and then log your DNS queries. Your data could still be at risk even if there is no intruder because the resolver on the public WiFi could harvest your data itself.

DNS spoofing

A DNS leak allows an intruder to monitor your activity, but if an attacker spoofs your DNS requests, they can redirect you to a malicious site they control. Also known as DNS poisoning, this happens when an attacker pretends to be your DNS resolver. The attacker then spoofs the IP address for a target website and replaces it with the IP address of a site under their control. The URL would be the same as the site you were intending to visit, but the site would be under the control of the attacker. Modern browsers will generally alert users that they are on a site without HTTPS, and this attack won’t work for HTTPS sites that have a certificate.

However, with a variation of DNS spoofing, an attacker could send you to a site with a slightly different URL from the one you were intending to visit. Think “protomvpn.com” instead of “protonvpn.com”. Moreover, this type of fake site can use HTTPS and have a valid certificate. Your browser would show a green lock next to address, making it harder to detect.


Unfortunately, with recent Punycode attacks, hackers have found a way to make two websites with the same URL and a valid HTTPS certificate. Punycode is a type of encoding used by web browsers to convert all the different Unicode characters (like ß, 竹, or Ж) into the limited character set (A-Z, 0-9) supported by the international domain names system. As an example, if a Chinese website used the domain “竹.com”, in Punycode, that would be represented by “xn--2uz.com”.

Intruders discovered that if you reverse the process and enter Punycode characters as a domain, as long as all the characters are from a single foreign language character set and the Punycode domain is an exact match as the targeted domain, then browsers will render it in the targeted domain’s normal language. In the example used in The Hacker News article linked above, a researcher registered the domain “xn--80ak6aa92e.com” which appeared as “apple.com”. The researcher even created this fake apple site to demonstrate how hard it is to tell the sites apart using URL and HTTPS information alone.

As the researcher’s example demonstrates, a Punycode site can implement HTTPS and receive a valid certificate, making it very hard for you to detect you are on a fake site. Only by examining the actual details on the HTTPS certificate can you differentiate between “xn--80ak6aa92e.com” and “apple.com”.

Fortunately, many browsers have already addressed this vulnerability and most would now show the address as xn--80ak6aa92e.com

Use a VPN on public WiFi

These are just some of the vulnerabilities you face when using an unsecured public WiFi network. Even if you visit a legitimate site with properly enforced HTTPS, it could contain images or scripts from sites not protected by HTTPS. An attacker could then use these scripts and images to deliver malware onto your device.

A trustworthy VPN can protect you from all of these vulnerabilities. A VPN encrypts your traffic and routes it through a VPN server, meaning that your Internet service provider (or the owner of a malicious WiFi hotspot) cannot monitor your online activity. This additional encryption will protect your connection from a TLS downgrade attack.  

Thorough VPN services, like Proton VPN, also run their own DNS servers, so that they can encrypt and process your DNS queries. Proton VPN’s apps protect you from a DNS leak by forcing your browser to resolve DNS queries via our DNS servers. We even protect your DNS queries if you are disconnected. Our Kill Switch feature instantly blocks all network connections if you are disconnected from your VPN server, keeping your data from being exposed.  

Proton VPN’s Free VPN plan offers everyone a free, simple way to protect their Internet connection against these attacks. With our free VPN service, you never have to use public WiFi without a VPN again.

Best Regards,
The Proton VPN Team

You can follow us on social media to stay up to date on the latest Proton VPN releases:

Twitter Facebook | Reddit

To get a free Proton Mail encrypted email account, visit: proton.me/mail

Prior to joining Proton, Richie spent several years working on tech solutions in the developing world. He joined the Proton team to advance the rights of online privacy and freedom.


  1. me

    This article wrongly describes social attacks of tricking the user into using the wrong but look-alike URL (i.e. punycode or other homographic attacks) as a “variation of DNS spoofing”. It is not. DNS spoofing only describes technical attacks where the attacker is able to fake the response of a DNS server. A VPN (and also HTTP alone) will protect against DNS spoofing attacks while neither HTTPS nor a VPN will protect against social attacks using look-alike URLs.

  2. SandSand

    Anyone with access to cable routers can see all your URLS generally. When using ProtonVPN, are the visited URLS encoded on one’s PC and only unpacked after hitting your server, or can those with access to the cable router see visited URLS? Thank you!

  3. ProtonVPN Admin

    Hello! The router will not have access as it will not be able to see the traffic within the VPN tunnel.

  4. Clear_Near

    Are you aware that DNS can be encrypted without a VPN, why not to mention, eh? The article scares people and it is misleading, VPN doesn’t protect against everything in the world, only some things. An encrypted DNS uses TLS, too, though, like your VPN does. If you care about users, public my comment, if you want censor, do not public as it usually goes (only a few pass). I am pretty sure you won’t as with my previous comments because you know the article was done wrong. Your support team is great but a moderator there is very questionable.

  5. ProtonVPN Admin

    Hello! You are correct, there are encrypted DNS protocols that will protect you against such attacks. Please note that encrypting your DNS requests doesn’t hide all your traffic.

  6. dima

    Thank you for the interesting information!
    Could you please give us a comment on DNS protection technology, such as DNS-over-TLS and DNS-over-HTTPS ? Is it secure? Can we trust Cloudflare and Google DNS to use these protocols? Your recommendation should we use it and how?
    Thank you.

  7. ProtonVPN Admin

    Hi, DNS-over-TLS and DNS-over-HTTPS are both encrypted protocols that will hide your DNS requests from an attacker. On their sites, Google and Cloudflare provide instructions on how you can configure those protocols on different platforms.

  8. RedDread

    Hello! The recent Chrome 73 now supports “TLS 1.3 downgrade hardening,” should help against. Why not use DNS over HTTPS or TLS, you know, like (CloudFlare) or (Quad9) and any other alike??? Firefox supports it, by the way, easy to do, Chrome will in the future. I am very surprised that the article didn’t mention it at all, that’s unexpected, very, other users who know about would be very surprised, too. If the claim is “a VPN who is using TLS will help,” an encrypted DNS will help as well, also you can use both like I do, it’s free.

Comments are closed.

your internet

Get Proton VPN
Get Proton VPN

For customer support inquiries, please submit the following form for the fastest response:
Support Form

For all other inquiries:

Version: OpenPGP.js v4.10.10
Comment: https://openpgpjs.org


You can also Tweet to us: