diff --git a/src/netcode/http-mserv.c b/src/netcode/http-mserv.c
index fd0b4aaf70023f59022be8e419b8c068e74f6db0..1623e1dec0b95be879ea59bfd3fd344729f5e988 100644
--- a/src/netcode/http-mserv.c
+++ b/src/netcode/http-mserv.c
@@ -277,6 +277,9 @@ HMS_connect (int proto, const char *format, ...)
 	cc = curl_easy_setopt(curl, CURLOPT_TIMEOUT, cv_masterserver_timeout.value);
 	if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", buffer->errbuf);
 
+	cc = curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 30L);
+	if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", buffer->errbuf);
+
 	cc = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read);
 	if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", buffer->errbuf);