diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php
index abbf9d86638963fdf84d2e44a8d8c751fdfa9298..e4a9f98e33e4cc6114fa52775ee8a70f9c21ea06 100644
--- a/lib/SimpleSAML/Utilities.php
+++ b/lib/SimpleSAML/Utilities.php
@@ -309,12 +309,10 @@ class SimpleSAML_Utilities {
 	 * allowed by configuration.
 	 */
 	public static function checkURLAllowed($url, array $trustedSites = NULL) {
-		$url = self::normalizeURL($url);
-
-		// verify that the URL points to an http or https site
-		if (!preg_match('@^https?://@i', $url)) {
-			throw new SimpleSAML_Error_Exception('Invalid URL: '.$url);
+		if (empty($url)) {
+			return '';
 		}
+		$url = self::normalizeURL($url);
 
 		// get the white list of domains
 		if ($trustedSites === NULL) {