Whenever I try to use a Winsock for downloading certain sites, it gives me a 301 error, but the URL it wants to redirect to is the same exact URL. These include common sites like Google and DuckDuckGo and many other common websites.

This is the header I sent.

Code:
GET / HTTP/1.1
Host: duckduckgo.com
User-Agent: Mozilla/5.0 (Windows NT 8.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
If-None-Match: W/""5b96e570-157a""
Cache-Control: max-age=0
When the program gets to Winsock1_Connect() it sends that as Winsock1.SendData

But instead of downloading the URL page like it should, it tells it to redirect to the exact same URL. I cannot figure out why or what to do about it.

It doesn't do it on all sites, just some of them. I think it happens mostly on sites that have a "https://" instead of "http://"

I think it may have to do with the way the site handles redirects, or something, but I don't really know much about that.

If someone knows this, I would appreciate it. I have been trying to solve this for days, and done numerous searches. I have tried everything I can find.