diff --git a/packages/core/http/core-http-server-internal/src/https_redirect_server.test.ts b/packages/core/http/core-http-server-internal/src/https_redirect_server.test.ts
index 6050d86ded357..3123fe8bba06c 100644
--- a/packages/core/http/core-http-server-internal/src/https_redirect_server.test.ts
+++ b/packages/core/http/core-http-server-internal/src/https_redirect_server.test.ts
@@ -96,3 +96,14 @@ test('forwards http requests to https', async () => {
       expect(res.header.location).toEqual(`https://${config.host}:${config.port}/`);
     });
 });
+
+test('keeps the request host when redirecting', async () => {
+  await server.start(config);
+
+  await supertest(`http://localhost:${config.ssl.redirectHttpFromPort}`)
+    .get('/')
+    .expect(302)
+    .then((res) => {
+      expect(res.header.location).toEqual(`https://localhost:${config.port}/`);
+    });
+});
diff --git a/packages/core/http/core-http-server-internal/src/https_redirect_server.ts b/packages/core/http/core-http-server-internal/src/https_redirect_server.ts
index 2999c4aaf734e..e621b864fa075 100644
--- a/packages/core/http/core-http-server-internal/src/https_redirect_server.ts
+++ b/packages/core/http/core-http-server-internal/src/https_redirect_server.ts
@@ -40,7 +40,7 @@ export class HttpsRedirectServer {
       return responseToolkit
         .redirect(
           formatUrl({
-            hostname: config.host,
+            hostname: request.url.hostname,
             pathname: request.url.pathname,
             port: config.port,
             protocol: 'https',