Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java	(revision 15208)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java	(revision 15209)
@@ -123,5 +123,5 @@
             wmsUrl.setEnabled(enabled);
             if (endpoint.isSelected() && !setDefaultLayers.isSelected() && wms != null) {
-                name.setText(wms.buildRootUrl());
+                name.setText(wms.buildRootUrlWithoutCapabilities());
             }
             onLayerSelectionChanged();
@@ -161,5 +161,5 @@
                 )
             );
-            name.setText(wms.buildRootUrl() + ": " + Utils.join(", ", tree.getSelectedLayers()));
+            name.setText(wms.buildRootUrlWithoutCapabilities() + ": " + Utils.join(", ", tree.getSelectedLayers()));
         }
         showBounds.setEnabled(tree.getSelectedLayers().size() == 1);
Index: trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 15208)
+++ trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 15209)
@@ -45,5 +45,7 @@
 public class WMSImagery {
 
-    private static final String CAPABILITIES_QUERY_STRING = "SERVICE=WMS&REQUEST=GetCapabilities";
+    private static final String SERVICE_WMS = "SERVICE=WMS";
+    private static final String REQUEST_GET_CAPABILITIES = "REQUEST=GetCapabilities";
+    private static final String CAPABILITIES_QUERY_STRING = SERVICE_WMS + "&" + REQUEST_GET_CAPABILITIES;
 
     /**
@@ -270,4 +272,16 @@
 
     /**
+     * @return root URL of services without the GetCapabilities call
+     * @since 15209
+     */
+    public String buildRootUrlWithoutCapabilities() {
+        return buildRootUrl()
+                .replace(CAPABILITIES_QUERY_STRING, "")
+                .replace(SERVICE_WMS, "")
+                .replace(REQUEST_GET_CAPABILITIES, "")
+                .replace("?&", "?");
+    }
+
+    /**
      * Returns URL for accessing GetMap service. String will contain following parameters:
      * * {proj} - that needs to be replaced with projection (one of {@link #getServerProjections(List)})
@@ -322,6 +336,7 @@
                         selectedLayers.size());
 
-        return buildRootUrl() + "FORMAT=" + format + ((imageFormatHasTransparency(format) && transparent) ? "&TRANSPARENT=TRUE" : "")
-                + "&VERSION=" + this.version + "&SERVICE=WMS&REQUEST=GetMap&LAYERS="
+        return buildRootUrlWithoutCapabilities()
+                + "FORMAT=" + format + ((imageFormatHasTransparency(format) && transparent) ? "&TRANSPARENT=TRUE" : "")
+                + "&VERSION=" + this.version + "&" + SERVICE_WMS + "&REQUEST=GetMap&LAYERS="
                 + selectedLayers.stream().collect(Collectors.joining(","))
                 + "&STYLES="
