diff --git src/wp-includes/link-template.php src/wp-includes/link-template.php
index 83e7f607be..64024b1166 100644
--- src/wp-includes/link-template.php
+++ src/wp-includes/link-template.php
@@ -3275,7 +3275,7 @@ function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
 	}
 
 	if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ), true ) ) {
-		if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $pagenow ) {
+		if ( is_ssl() ) {
 			$scheme = 'https';
 		} else {
 			$scheme = parse_url( $url, PHP_URL_SCHEME );
