diff --git a/typo3/sysext/core/Classes/Http/Uri.php b/typo3/sysext/core/Classes/Http/Uri.php
index 16e6fd6cfe52e267b2e346eed2c7f25b65de099b..8390cf59f64f82ea0abf7d6a43d4cd52fa3603ed 100644
--- a/typo3/sysext/core/Classes/Http/Uri.php
+++ b/typo3/sysext/core/Classes/Http/Uri.php
@@ -45,7 +45,7 @@ class Uri implements UriInterface
      * The default scheme for the URI
      * @var string
      */
-    protected $scheme;
+    protected $scheme = '';
 
     /**
      * @var int[] Associative array containing schemes and their default ports.
diff --git a/typo3/sysext/core/Classes/Routing/SiteMatcher.php b/typo3/sysext/core/Classes/Routing/SiteMatcher.php
index c9a21fb678936a96d8a81ec65cebe832aad358d6..f34bd8c200af5e265e15904c1edb924163be1a9b 100644
--- a/typo3/sysext/core/Classes/Routing/SiteMatcher.php
+++ b/typo3/sysext/core/Classes/Routing/SiteMatcher.php
@@ -189,7 +189,7 @@ class SiteMatcher implements SingletonInterface
                 array_filter(['tail' => '.*', 'port' => (string)$uri->getPort()]),
                 ['utf8' => true],
                 $uri->getHost() ?: '',
-                $uri->getScheme()
+                $uri->getScheme() === '' ? [] : [$uri->getScheme()]
             );
             $identifier = 'site_' . $site->getIdentifier();
             $groupedRoutes[($uri->getScheme() ?: '-') . ($uri->getHost() ?: '-')][$uri->getPath() ?: '/'][$identifier] = $route;
@@ -202,7 +202,7 @@ class SiteMatcher implements SingletonInterface
                     array_filter(['tail' => '.*', 'port' => (string)$uri->getPort()]),
                     ['utf8' => true],
                     (string)idn_to_ascii($uri->getHost()),
-                    $uri->getScheme()
+                    $uri->getScheme() === '' ? [] : [$uri->getScheme()]
                 );
                 $identifier = 'site_' . $site->getIdentifier() . '_' . $siteLanguage->getLanguageId();
                 $groupedRoutes[($uri->getScheme() ?: '-') . ($uri->getHost() ?: '-')][$uri->getPath() ?: '/'][$identifier] = $route;
diff --git a/typo3/sysext/core/Classes/Site/Entity/Site.php b/typo3/sysext/core/Classes/Site/Entity/Site.php
index 3d20c20f2a70cedfd1c56d4877446680dd4bc4aa..a54afd446cb94c828abc3b1a363f08709ff76944 100644
--- a/typo3/sysext/core/Classes/Site/Entity/Site.php
+++ b/typo3/sysext/core/Classes/Site/Entity/Site.php
@@ -114,7 +114,7 @@ class Site implements SiteInterface
                 );
                 $base = new Uri($this->sanitizeBaseUrl($base));
                 // no host given by the language-specific base, so lets prefix the main site base
-                if ($base->getScheme() === null && $base->getHost() === '') {
+                if ($base->getScheme() === '' && $base->getHost() === '') {
                     $base = rtrim((string)$this->base, '/') . '/' . ltrim((string)$base, '/');
                     $base = new Uri($this->sanitizeBaseUrl($base));
                 }