does a vpn protect against viruses does a vpn protect you from viruses and malware will a vpn protect me from viruses

Does a VPN protect against viruses? What it can't stop

Adrian Maverick · · 8 min read

No, a VPN does not protect against viruses. It encrypts your connection and routes it through another server, but it does not scan files, inspect apps, or decide what runs on your device, so anything you download or open still reaches you through the tunnel.

What protects you from viruses is a different set of tools, and most of them are already on your phone or computer for free. Here is why a VPN cannot do that job, how malware actually gets in, and what to turn on instead.

What a VPN does, and why viruses are a different problem

The EFF's guide to choosing a VPN puts it plainly: VPNs "are best suited for one thing: routing your network connection through a different network." It also warns that VPN ads claiming a VPN is "the only tool you need to stop cyber criminals, malware, government surveillance, and online tracking" "vastly oversell the benefits of VPNs."

A virus is not a network problem. NIST's glossary lists malware as "a virus, worm, Trojan horse, or other code-based entity that infects a host," and adds that "spyware and some forms of adware are also examples of malicious code." In NIST's guide to malware incident prevention, malware is a program "covertly inserted into another program" to destroy data or compromise your system, and it is "the most common external threat to most hosts."

The key word is host. Malware does its damage on your device, once it is running. A VPN works one layer lower, on the traffic between your device and the internet. It encrypts that traffic so the Wi-Fi owner and your internet provider cannot read it, but it treats an infected file exactly like a safe one: as data to deliver.

How viruses actually get onto your device

The FTC's page on how to protect against and remove malware lists the usual routes:

  • Phishing emails with malicious links. You click, and the link downloads something or sends you to a page that does.
  • Fake security warnings. A pop-up says your device is infected and pushes you to install a "fix" that is the actual malware.
  • Bogus software ads on social media and search engines, pointing to fake download pages.
  • Free downloads from unfamiliar sites and peer-to-peer file sharing, which the FTC tells people to avoid.

Look at that list with a VPN switched on. The phishing email arrives in your inbox the same way. The fake warning appears in your browser the same way. The bogus ad leads to the same download. In every case you are the one who clicks or installs, and the VPN carries the file to you, encrypted, like any other.

What actually protects you from viruses

Security software that scans files

CISA's explainer on antivirus software describes what it does: it "scans files or your computer's memory for certain patterns that may indicate the presence of malicious software," based on signatures of known malware. CISA recommends saving and scanning email attachments and web downloads rather than opening them directly, and says "installing any anti-virus software will increase your level of protection."

It is also honest about the limit: "Because it relies on signatures, anti-virus software can only detect malware that has known characteristics." That is why the next step matters as much as the scanner.

Updates, turned on automatically

CISA's update software page says "many software updates are created to fix security risks." Its advice is to install updates as soon as possible, turn on automatic updates, and pay special attention to web browsers and antivirus software. Apple says the same on its iPhone update page: "Keeping your software up to date is one of the most important things you can do to maintain your Apple product's security."

Updates close the holes that malware uses. A VPN cannot patch anything on your device.

The protection already built into your device

You probably do not need to buy anything to get a scanner.

  • Windows. Microsoft's Windows Security app "is built into Windows" and includes Microsoft Defender Antivirus, Windows Firewall and Smart App Control. Defender "continuously scans your device." To check something yourself, open Windows Security and select Virus & threat protection, then Quick scan, or right-click a file in File Explorer and choose Scan with Microsoft Defender (on Windows 11 you may need Show more options first).
  • Android. Google's Play Protect "checks your apps and devices for harmful behavior." It runs a safety check on Play Store apps before you download them, checks apps from other sources, and "may deactivate or remove harmful apps." Google says it is on by default and recommends you "always keep Google Play Protect on."
  • iPhone and iPad. Keep automatic updates on, as Apple recommends on its update page.

Care with links, attachments and downloads

The FTC's advice is simple: do not click links in unexpected emails or pop-up windows, and get software from sources you know. Most infections still need you to open something. Our guide on how to spot a phishing email covers the signs.

What about VPN apps with threat protection?

Some VPN apps include a separate feature that blocks known malicious sites. That feature is not the VPN. It is usually a DNS filter: a list of bad domain names that the app refuses to look up while you are connected.

That can stop you from reaching a known bad site, which is useful. But it has the same blind spots as DNS ad blocking, which we cover in does a VPN block ads. It only knows domains on its list, it does not scan the file you download, and it does nothing about an infected attachment already in your inbox or a USB stick you plug in. Treat it as an extra, never as your antivirus.

Can a VPN give you a virus?

A trustworthy VPN app will not, but a VPN app is software like any other, and you are giving it a lot of trust. The EFF warns that "a disreputable VPN service might" collect personal information deliberately. Free apps from companies you have never heard of are the riskiest case. Our post on whether free VPNs are safe goes through what to check before you install one. Download any VPN only from your device's official app store or the company's own website.

Gotchas

  • "Your device is infected" pop-ups are often the attack. The FTC lists fake security warnings as a common way malware spreads. Close the page; do not install what it offers.
  • A VPN can make a bad site look less suspicious, not more safe. The padlock in your browser and the VPN icon in your status bar say nothing about whether a file is clean.
  • Signs you may already be infected, per the FTC: your device slows down, freezes or crashes, your browser homepage changes or redirects you, new toolbars appear, you see far more pop-up ads, or emails and posts go out that you did not send.
  • If you think you are infected, the FTC's steps are to stop using sensitive accounts, update your security software and run a scan, then change your passwords and turn on two-factor authentication.

Frequently asked questions

Does a VPN protect you from viruses and malware?

No. A VPN encrypts your connection, it does not inspect files or apps. Security software, automatic updates and care with links and downloads are what protect you, according to CISA and the FTC.

Does a VPN protect your phone from viruses?

No. On Android, Google Play Protect is the built-in malware check, and Google recommends keeping it on. On iPhone, Apple calls keeping your software up to date one of the most important things you can do for security.

Do I need antivirus if I have a VPN?

Yes, they do different jobs. A VPN protects your traffic on the network, antivirus checks what lands on your device. On Windows, Microsoft Defender Antivirus is already built in.

Can a VPN stop ransomware?

No. Ransomware is malware, and it gets in the same ways: phishing links, bad downloads and unpatched software. Updates, security software and backups are the defenses.

Can a VPN give you a virus?

A reputable one will not. An unknown or free VPN app is a piece of software you are trusting with all your traffic, so only install one from a company and an app store you trust.

Does a VPN protect you from hackers?

Only some of them: the ones watching your traffic on a network you share. Our post on whether a VPN protects you from hackers maps which attacks it covers and which it does not.

Where a VPN does fit

Keep your scanner and your updates for viruses, and use a VPN for your connection. Secria VPN is post-quantum on every connection and runs on RAM-only servers. No activity logs: we do not record browsing, DNS queries or traffic contents. It is $7.99 a month on its own, or part of Secria Pro at $9.99 a month with Secria Mail and the VPN on 5 devices. See pricing.

Secria fact-checks every post against primary sources. Spotted something wrong or out of date? Email hq@secria.me and we will correct it.