I know VPNs aren’t the best for privacy, but I’m curious, would a VPN be able to only see a domain and subdomain if the website is https? or can they see more somehow?
Ignore the other comments here. These couch experts don’t know what they’re about.
A VPN hides your traffic from your ISP/network operator. This includes the domain you request (test.website.com) as well as the resource (/hello/123.html)
IF
you also set your DNS server to something other than your ISP or VPN Provider (such as Cloudflare’s 1.1.1.1 service). Otherwise your ISP will see you are looking up that website.
BECAUSE
the website hopefully uses HTTPS, and the request to that website is end-to-end encrypted, including the resources you’re requesting from the server.
URL path (resource) is end-to-end (between your browser and end website) encrypted in an HTTPS request, along with the body, any query parmeters in the URL and POST params. So only the domain (or more specifically the IP) is transparent to your VPN provider.
As another user mentioned, the domain could get leaked to your ISP (besides the VPN provider) via DNS requests (depending of your PCs DNS cache lifetime and router cache), unless you use your own DNS provider over HTTPS. But your requests would still include an IP, which could be reversed to a domain via a trivial whois / lookup in a list.
But the thing you are worried about, the path in the URL (folders as you call it, but nowdays URL rewrite means that most probably there isn’t a direct association between URI and web server’s disk structure) should be encrypted and only the website you are visiting can decrypt it (via its private key of the SSL certificate).
Think of a VPN as like a tunnel. Your computer is connected to one end and your internet connection, rather than appearing to come straight out of your computer via your internet services provider comes out somewhere else. That ‘somewhere else’ is controlled by whoever manages your VPN. Beyond this there isn’t any difference regarding what you can access or not via your internet connection- email, HTTP, https etc. To the outside world, you appear to be wherever the VPN exit point is. This is why people use VPN to watch, for instance Netflix from a different country.
It is true that you should bear in mind whether all of your traffic is going over the VPN or not. As for instance /u/cellardoor has pointed out You should be careful that your DNS traffic also goes over your VPN. Otherwise, people will see where you’re going as your computer looks up the addresses even if they cannot see the traffic itself. There are many other options, but if you’re using a VPN service sold to the general public then you should just check if all your traffic goes over the VPN or not.
in case I have misunderstood your question, You are sending all of your traffic via the VPN operator using their encryption, so you should presume that they can see all of your traffic over that connection unless it is separately encrypted.