How to Set Up a VPN on Windows: App and Built-in Setup
You’ve decided to install a VPN on your PC for added privacy and security online, but how do you install one, and which method is the most secure? Is a VPN app better, or should you manually install it with the built-in Windows VPN client?
In this article, we’ll cover everything you need to know about how to set up a VPN on Windows 10 and 11, help you choose between a manual setup or an app, and provide troubleshooting tips.
How to Set Up a Windows VPN: Your Options
Before you dive into the setup, you’ll need to pick a reliable, secure VPN provider. You’ll need an active VPN subscription (or login credentials from your VPN provider) for all three methods below. Then, decide how you want to set the VPN up.
You can set up a VPN on Windows in three ways:
- Use a commercial VPN app: Most commercial VPN services offer a dedicated app for Windows. Just download it from the provider’s website, sign in, and connect. This is the simplest method, and with a good VPN like Private Internet Access for Windows, you’ll get access to fast and secure protocols like WireGuard and OpenVPN, along with extra features like a kill switch, split tunneling, ad and malware blocking, and customizable connections.
- Use the built-in VPN client in Windows: If your VPN provider supports manual configuration, you can use Windows’ built-in VPN client. This method is a bit more technical, as you’ll need to enter server info, your login credentials, and choose a supported protocol (like L2TP/IPSec or IKEv2). It’s a good option if you want to avoid installing extra software.
- Use a third-party client: If you want to use a protocol not supported by Windows’ built-in client, some VPN providers let you connect using open-source or independent VPN clients like OpenVPN Connect or SoftEther VPN Client. With this option, you manually import configuration files provided by your VPN service. It offers more control but requires a bit more setup know-how.
How to Set Up a Windows VPN Using an App
If you have a Windows laptop or desktop, installing a VPN app is the fastest and easiest way to get started. Most VPN providers offer a dedicated Windows app that you can set up in just a few clicks.
- Buy a VPN and download the Windows app.
- In your recent downloads, click on the file you just downloaded to run the installation and setup.
- Follow the on-screen prompts to complete the setup, then sign in.
- Connect to a server in your desired region. That’s it! Your VPN should now be up and running.
How to Manually Set Up a VPN on Windows (10 and 11)
If you’d rather avoid extra software running in the background or giving third-party apps system permissions, you can set up a VPN yourself. Manual configuration is especially useful if you’re connecting to a work VPN or running your own VPN server.
There are two main ways to do this on Windows: using the built-in VPN client or setting up a connection through a third-party client like OpenVPN or WireGuard.
Method 1: Built-in VPN Client
Before you start: To manually set up a VPN on your Windows device via the built-in VPN client, you’ll need a VPN provider that shares its servers’ IP addresses. PIA VPN doesn’t disclose server IP addresses for privacy and security reasons.
- Get an IP address or the server name from your VPN provider. This should be the IP address of the VPN server you want to connect to.
- Open the Windows Start menu and hover over the gear icon, then click on Settings.
- In the Settings window, click Network & Internet.
- Select VPN.
- In the next window, go to VPN connections and click Add VPN.
- Under VPN provider, choose Windows (built-in). Choose any connection name you want, enter the VPN server address you got from your VPN provider, select your VPN protocol type (e.g., IKEv2), and add your VPN username and password. Click Save.
⚠️ Note: When you select your protocol under VPN type, you’ll notice that Windows only supports IKEv2, L2TP/IPSec, SSTP, and PPTP. We don’t recommend a majority of these protocols because most can’t provide sufficient protection on their own. The most secure option available is IKEv2, and it’s best to choose it over leaving it on Automatic, which lets Windows fall back to outdated protocols like PPTP or basic L2TP.
If you want to use a more modern and secure protocol like OpenVPN or WireGuard, use a third-party client.
- Once you’ve saved your VPN settings, you should see your new connection listed under VPN in the next window. Click Connect to connect to your VPN (or you can also access it via the Network icon in your taskbar). If you have a username and password, it will ask you to log in; if not, it will connect automatically.
⚠️Note: Windows only lets you add one server IP address per VPN setup. If you want the option to connect to other servers, you’ll need to create a separate VPN connection for each one and switch between them in your network settings.
Method 2: Third-Party Client
If you want to manually configure a VPN on Windows using protocols like OpenVPN or WireGuard, you can do this with a third-party client and manual configuration files from your VPN provider.
PIA offers manual configuration files for OpenVPN, which you can use with OpenVPN Connect. OpenVPN Connect is one of the most popular third-party VPN clients and provides support for all major operating systems, including macOS, iOS, Android, Linux, and Windows.
Here’s how to set it up:
- Go to the official website of the VPN client you want to use, like OpenVPN Connect, and download the Windows installer.
- Install the client. Run the installer, follow the prompts, and then click Finish. You may need administrator access, and some clients might also install virtual network adapters during the installation process.
- Subscribe to PIA VPN, then download the correct OVPN configuration files. Save them somewhere they’ll be easy to find (e.g., your desktop).
- Unzip the folder and choose your server location. You need to install server locations one at a time. Open the OpenVPN Connect application, click on the Upload File tab, and drag the server file you want to use into the window.
- You’ll see that the server fields automatically fill in. Add your login credentials (if required) and then assign the certificate (the certificate file is also located in the OVPN configuration files). Once all fields are filled in appropriately, hit Save in the upper righthand corner of the app.
- Launch the VPN client, select the server you’ve loaded, and toggle the button on to connect. You will see a confirmation message once the connection is successful.
How to Configure Your Windows VPN
Now that you’ve downloaded and set up a VPN on your Windows device, you can configure the settings to get the most out of it.
1. Set Up Auto-Connect on Startup
Auto-connect, sometimes called “Always On VPN,” starts the VPN up the moment your PC turns on. This way, you’re protected for the entirety of your online session without having to think about enabling your VPN every time. The way you enable auto-connect will vary by the method you used to set up your VPN.
If you’re using a VPN app, the process is generally as easy as toggling a button in your VPN settings. For example, on the PIA VPN Windows app, you can find it under Settings > General > Launch on System Startup. Simply enable the feature, and you’re connected as soon as you switch on your PC. If you only want to auto-connect when you open the PIA app, select Connect on Launch instead.
If you use Windows’ built-in VPN, it doesn’t have an automatic connect option. You need to configure one manually by creating a startup command:
- Open Notepad and type the following: C:\Windows\System32\rasdial.exe VPNConnectionName VPNUsername VPNPassword.
- Save the file to your desktop as auto-connect-vpn.bat (not as a .txt file).
- Drag and drop the file into the Windows system folder C:\Users\BettyLou\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. (After C:\Users\, your username will show; BettyLou is just here as an example.)
- Restart your computer. Your VPN should automatically turn on when the system boots up.
2. Enable Kill Switch
A kill switch is a handy security feature that disconnects your device from the internet if your VPN connection drops unexpectedly. This prevents your real IP address from being exposed while the VPN reconnects.
Most good Windows VPNs have a kill switch in their settings. In the PIA Windows app, you can enable it under Settings > Privacy > VPN Kill Switch. Here, you’ll also notice an Advanced Kill Switch option: if you enable it, PIA won’t let you go online unless you’re connected to the VPN.
3. Use Split-Tunneling
Split-tunneling allows you to choose which apps or websites go through the VPN and which use your regular internet connection. You typically need split-tunneling if you want to use the VPN only for specific apps, such as file-sharing applications, or if you need to disable the VPN for certain activities, like accessing local network devices such as printers or using applications that block VPN traffic, including bank apps.
In VPN apps that support it, you’ll usually find this under the settings menu. This can be found under Settings > Split Tunnel in the PIA Windows app.
Quick Troubleshooting Tips for Your Windows VPN
1. Verifying Connectivity
The easiest way to tell if your VPN is connected is to click on the VPN icon in the taskbar; it displays Connected if it’s active or the Connect button if it isn’t. You can also run an IP address check: if it shows your VPN location, then you’re connected. If you’re sure you’re connected but it’s not showing the right location, it means your DNS might be leaking. You can do a separate DNS leak test here.
You can also check your connection with a ping test. Open the Command Prompt (search “cmd” in the Windows search bar), type “ping” followed by the IP address of the server you’re connected to, and press Enter. This measures response time and helps identify basic connectivity issues, like whether the server is accepting connection requests.
2. Restart Your VPN or Device
Occasionally, a simple glitch in the network can cause software to misbehave, and a VPN is no different. Try disconnecting the VPN, logging out, and closing it before reopening and connecting again. This usually clears most minor issues with software and hardware, almost like a soft reset. If this doesn’t work, you can also try powering your device off and back on again.
3. Install VPN and OS Updates
Install any pending software or security updates for your VPN client and your operating system. Ensuring your system and VPN are up to date helps prevent any issues that may arise from weaknesses in the software that could leave openings for cyberattackers to manipulate.
4. Manage DNS Settings
If you’re experiencing issues connecting to your VPN, check your DNS settings to ensure your DNS address is correct. To check your DNS settings, go to Settings > Network and Internet > Wi-Fi, and then click on your connection.
Scroll down the page to view your current connection information. If you discover your DNS address is incorrect, you can use the following instructions to change the information.
- Open Settings and select Network & Internet.
- Select Wi-Fi and click on your Wi-Fi connection.
- Scroll down to DNS server assignment and select Edit.
- Select Manual from the dropdown menu.
- Enable IPv4 and then find the Preferred DNS field.
- Enter the DNS address you want to use and save your settings.
5. Adjust Firewall Settings
If your firewall and VPN fail to cooperate, it could leave you vulnerable. The steps below show how to configure Windows Firewall to allow your VPN traffic through.
- Open Windows Settings and select Privacy & security from the left-hand menu.
- Choose Windows Security and click Firewall and network protection.
- Select Allow an app through the firewall, then click Change settings.
- Check the box next to your VPN. If your VPN isn’t on the list, click Allow another app, search for and select your VPN, and click Add.
- Click OK to save your changes, then exit the window.
If you use a third-party firewall, check with the software manufacturer for exact steps on how to allow VPN traffic through your firewall.
ℹ️ If you experience any other issues while setting up PIA VPN on Windows, you can contact our 24/7 customer support for assistance.
How to Choose a Good VPN for Windows
Here’s what to look for in a Windows VPN:
- Strong encryption: Encryption protects your internet traffic during transit. Then, if anyone does intercept your data, they won’t be able to read it. Look for VPNs that use 128-bit or 256-bit AES encryption. With today’s technology, neither can realistically be cracked; even with massive computing power, it would take billions of years to break. Private Internet Access lets you switch between the two, so you can easily choose 128-bit for day-to-day browsing and increase your protection with 256-bit for more sensitive tasks.
- Secure protocol options: While IKEv2 and L2TP/IPSec are still in use, OpenVPN and WireGuard are the most secure VPN connection protocols. OpenVPN is great for security- and privacy-focused tasks (like banking or accessing health records), and WireGuard for bandwidth-intensive activities (like streaming or gaming).
- No-logs policy: All good VPNs should have a strict no-logs policy, which ensures the provider won’t collect or store any information about what you do online.
- Good server network: Servers in or near your target location are crucial for reliably accessing your accounts at home and during travel and for maintaining the best connection speeds. PIA has VPN servers in 90+ countries.
- Fast speeds: VPN encryption slows down your connection, so it’s important to have a provider that has the infrastructure to make sure you get the best possible speeds. PIA VPN uses 10-Gbps network cards to ensure blazing-fast speeds.
- Built-in kill switch: A kill switch stops your internet connection if your VPN disconnects, preventing your real IP from being exposed. PIA offers two options on Windows: a regular Kill Switch that blocks the internet only when the VPN drops and an Advanced Kill Switch that locks all internet traffic unless the VPN is active.
- Responsive customer support: Good support helps you quickly solve setup issues or fix problems if your VPN stops working. Look for VPNs that offer 24/7 live chat, a detailed knowledge base, and email support so you can get help whenever you need it.
Can I Use a Free VPN for Windows?
You can, but you should be careful when choosing a free VPN and be aware of the limitations it may come with. Some free VPNs have poor data handling practices and may even collect and share your data. Free VPNs also often limit you to a small selection of servers, so you could experience slow speeds due to overcrowding.
You should also ensure that the VPN offers all of the security and privacy features you need. A free VPN may not offer strong encryption, secure protocols, a kill switch, or other features many premium VPNs like PIA VPN consider a necessity to protect your online data.
FAQ
How can I check if my VPN is working properly on Windows?
To determine if your VPN is working correctly, you can use several troubleshooting methods. These include performing connectivity checks and ensuring that all your VPN information was entered correctly.
Which VPN protocol is best for speed and security on Windows?
In general, WireGuard is considered the best protocol for speed and security. It isn’t available for the built-in Windows VPN, so if you want to use it, you’ll need to download a commercial VPN that offers the WireGuard protocol. If you’re set on using Windows’ built-in VPN, IKEv2 is considered one of the fastest and most secure protocols among the available options.
Can I set my VPN to auto-connect when Windows starts?
Yes. Whether you install your VPN manually using Windows’ built-in VPN or choose to use a VPN app, you can have the option of auto-connecting on startup. If you use Windows’ built-in VPN, you’ll need to configure it manually using a batch file. On the other hand, most VPN apps that offer auto-connect allow you to enable it with a single click in settings.
How do I prevent DNS leaks when using a VPN on Windows?
DNS leaks occur when traffic escapes from your VPN, revealing your DNS, IP address, and other information about your connection. The best way to prevent DNS leaks is to ensure that your VPN is properly configured, whether you use the built-in Windows VPN or an app.
Verify your DNS settings are correct, including your preferred DNS address. If everything looks correct and no configuration is needed, perform a DNS leak test using an online checking tool to confirm your connection is secure.