diff --git a/jupyter_server/serverapp.py b/jupyter_server/serverapp.py index 8aa3dbd082..9171065132 100644 --- a/jupyter_server/serverapp.py +++ b/jupyter_server/serverapp.py @@ -2385,7 +2385,9 @@ def display_url(self) -> str: """Human readable string with URLs for interacting with the running Jupyter Server """ - url = self.public_url + "\n " + self.local_url + url = self.public_url + if self.public_url != self.local_url: + url = f"{url}\n {self.local_url}" return url @property