diff --git a/tests/data/test310 b/tests/data/test310
index 005f713106..15cdaf4566 100644
--- a/tests/data/test310
+++ b/tests/data/test310
@@ -32,8 +32,12 @@ https Server-localhost-sv.pem
simple HTTPS GET
---cacert certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/310
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/310
+# Ensure that we're running on localhost because we're checking the host name
+
+perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
+
#
diff --git a/tests/data/test311 b/tests/data/test311
index cd51fff746..13c2d4d000 100644
--- a/tests/data/test311
+++ b/tests/data/test311
@@ -24,8 +24,12 @@ https Server-localhost0h-sv.pem
HTTPS wrong subjectAltName but right CN
---cacert certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/311
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/311
+# Ensure that we're running on localhost because we're checking the host name
+
+perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
+
#
diff --git a/tests/data/test312 b/tests/data/test312
index 5adb1e3526..7f390b4c98 100644
--- a/tests/data/test312
+++ b/tests/data/test312
@@ -24,8 +24,12 @@ https Server-localhost.nn-sv.pem
HTTPS GET to localhost and null-prefixed CN cert
---cacert certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/312
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/312
+# Ensure that we're running on localhost because we're checking the host name
+
+perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
+
#