diff --git wp-includes/ms-blogs.php wp-includes/ms-blogs.php
index b18ef17e69..34d6c28c76 100644
--- wp-includes/ms-blogs.php
+++ wp-includes/ms-blogs.php
@@ -87,13 +87,8 @@ function get_id_from_blogname( $slug ) {
 	$current_network = get_network();
 	$slug            = trim( $slug, '/' );
 
-	if ( is_subdomain_install() ) {
-		$domain = $slug . '.' . preg_replace( '|^www\.|', '', $current_network->domain );
-		$path   = $current_network->path;
-	} else {
-		$domain = $current_network->domain;
-		$path   = $current_network->path . $slug . '/';
-	}
+	$domain = $current_network->domain;
+	$path   = $current_network->path . $slug . '/';
 
 	$site_ids = get_sites(
 		array(
