diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py
index eeff5c1d1..1e5a221f7 100644
--- a/IPython/frontend/html/notebook/notebookapp.py
+++ b/IPython/frontend/html/notebook/notebookapp.py
@@ -70,6 +70,7 @@ from IPython.zmq.ipkernel import (
IPKernelApp
)
from IPython.utils.importstring import import_item
+from IPython.utils.localinterfaces import LOCALHOST
from IPython.utils.traitlets import (
Dict, Unicode, Integer, List, Enum, Bool,
DottedObjectName
@@ -87,9 +88,6 @@ _notebook_id_regex = r"(?P\w+-\w+-\w+-\w+-\w+)"
_profile_regex = r"(?P[^\/]+)" # there is almost no text that is invalid
_cluster_action_regex = r"(?Pstart|stop)"
-
-LOCALHOST = '127.0.0.1'
-
_examples = """
ipython notebook # start the notebook
ipython notebook --profile=sympy # use the sympy profile
@@ -610,7 +608,7 @@ class NotebookApp(BaseIPythonApplication):
info("Use Control-C to stop this server and shut down all kernels.")
if self.open_browser or self.file_to_run:
- ip = self.ip or '127.0.0.1'
+ ip = self.ip or LOCALHOST
try:
browser = webbrowser.get(self.browser or None)
except webbrowser.Error as e: