diff --git a/openid-connect-server-webapp/src/main/webapp/resources/template/client.html b/openid-connect-server-webapp/src/main/webapp/resources/template/client.html
index 822e2c92a..df24ab06c 100644
--- a/openid-connect-server-webapp/src/main/webapp/resources/template/client.html
+++ b/openid-connect-server-webapp/src/main/webapp/resources/template/client.html
@@ -72,7 +72,7 @@
var uri = $.url(client.redirectUris[i]);
if (!uri.attr('protocol')) {
%>?<%
- } else if (uri.attr('protocol') == 'http' && uri.attr('host') != 'localhost') {
+ } else if (uri.attr('protocol') == 'http' && (uri.attr('host') != 'localhost' && uri.attr('host') != '127.0.0.1')) {
%><%- uri.attr('protocol') %>://<%
} else if (uri.attr('protocol') != 'https' && uri.attr('protocol') != 'http') {
%><%- uri.attr('protocol') %>://<%