diff --git a/app/views/NewServerView.js b/app/views/NewServerView.js index c70500412..58755a65e 100644 --- a/app/views/NewServerView.js +++ b/app/views/NewServerView.js @@ -181,7 +181,7 @@ class NewServerView extends React.Component { url = `${ url }.rocket.chat`; } - if (/^(https?:\/\/)?(((\w|[0-9])+(\.(\w|[0-9-_])+)+)|localhost)(:\d+)?$/.test(url)) { + if (/^(https?:\/\/)?(((\w|[0-9-_])+(\.(\w|[0-9-_])+)+)|localhost)(:\d+)?$/.test(url)) { if (/^localhost(:\d+)?/.test(url)) { url = `http://${ url }`; } else if (/^https?:\/\//.test(url) === false) {