diff --git a/http/http_connection.h b/http/http_connection.h
index 3459d55..689b60a 100644
--- a/http/http_connection.h
+++ b/http/http_connection.h
@@ -61,12 +61,12 @@
     public std::enable_shared_from_this<Connection<Adaptor, Handler>>
 {
   public:
-    Connection(Handler* handlerIn, const std::string& ServerNameIn,
+    Connection(Handler* handlerIn,
                std::function<std::string()>& get_cached_date_str_f,
                detail::TimerQueue& timerQueueIn, Adaptor adaptorIn) :
         adaptor(std::move(adaptorIn)),
-        handler(handlerIn), serverName(ServerNameIn),
-        getCachedDateStr(get_cached_date_str_f), timerQueue(timerQueueIn)
+        handler(handlerIn), getCachedDateStr(get_cached_date_str_f),
+        timerQueue(timerQueueIn)
     {
         parser.emplace(std::piecewise_construct, std::make_tuple());
         parser->body_limit(httpReqBodyLimit);
@@ -81,11 +81,15 @@
                                .tls)
         {
             adaptor.set_verify_mode(boost::asio::ssl::verify_peer);
-            SSL_set_session_id_context(
+            std::string id = "bmcweb";
+            int ret = SSL_set_session_id_context(
                 adaptor.native_handle(),
-                reinterpret_cast<const unsigned char*>(serverName.c_str()),
-                static_cast<unsigned int>(serverName.length()));
-            BMCWEB_LOG_DEBUG << this << " TLS is enabled on this connection.";
+                reinterpret_cast<const unsigned char*>(id.c_str()),
+                static_cast<unsigned int>(id.length()));
+            if (ret == 0)
+            {
+                BMCWEB_LOG_ERROR << this << " failed to set SSL id";
+            }
         }
 
         adaptor.set_verify_callback([this](
@@ -447,7 +451,6 @@
             res.body().clear();
         }
 
-        res.addHeader(boost::beast::http::field::server, serverName);
         res.addHeader(boost::beast::http::field::date, getCachedDateStr());
 
         res.keepAlive(req->keepAlive());
@@ -744,8 +747,6 @@
 
     std::weak_ptr<persistent_data::UserSession> session;
 
-    const std::string& serverName;
-
     std::optional<size_t> timerCancelKey;
 
     bool needToCallAfterHandlers{};
diff --git a/http/http_server.h b/http/http_server.h
index 92971fb..c26e9e0 100644
--- a/http/http_server.h
+++ b/http/http_server.h
@@ -104,7 +104,7 @@
         };
         timer.async_wait(timerHandler);
 
-        BMCWEB_LOG_INFO << serverName << " server is running, local endpoint "
+        BMCWEB_LOG_INFO << "bmcweb server is running, local endpoint "
                         << acceptor->local_endpoint();
         startAsyncWaitForSignal();
         doAccept();
@@ -185,7 +185,7 @@
         {
             adaptorTemp = Adaptor(*ioService, *adaptorCtx);
             auto p = std::make_shared<Connection<Adaptor, Handler>>(
-                handler, serverName, getCachedDateStr, timerQueue,
+                handler, getCachedDateStr, timerQueue,
                 std::move(adaptorTemp.value()));
 
             acceptor->async_accept(p->socket().next_layer(),
@@ -203,7 +203,7 @@
         {
             adaptorTemp = Adaptor(*ioService);
             auto p = std::make_shared<Connection<Adaptor, Handler>>(
-                handler, serverName, getCachedDateStr, timerQueue,
+                handler, getCachedDateStr, timerQueue,
                 std::move(adaptorTemp.value()));
 
             acceptor->async_accept(
@@ -229,7 +229,6 @@
     std::string dateStr;
 
     Handler* handler;
-    std::string serverName = "bmcweb";
 
     std::function<void(const boost::system::error_code& ec)> timerHandler;
 
