Skip to content
MangoMap Help Centre
Esc
↑↓navigate↵open⌘Jpreview
On this page

WMS connection failed

Fix a WMS connection error on the Connect button. Check the full GetCapabilities URL, HTTPS, CORS limits, authentication, and the WMS XML.

If Connect shows a WMS fetch or parse error, MangoMap could not read the GetCapabilities response from the URL.

Work through these checks in order. The first one that fails points to its fix in the sections below:

Why Connect fails Flowchart: check that the URL returns XML in a browser tab, starts with https://, has no CORS error, needs no login, and is a WMS rather than WMTS or WFS; each failed check points to its fix or means the service can’t be connected; if all pass, add version=1.3.0 and test the URL with curl. NO NO NO NO NO YES YES YES YES YES Connect shows an error Returns XML ina browser tab? Starts withhttps://? No CORS error inthe Network tab? Works withouta login? A WMS, notWMTS or WFS? Add the GetCapabilities query?service=WMS&request=GetCapabilities Change http:// to https://no HTTPS at the provider: can’t connect Ask the provider to allow CORSuntil they do: can’t connect Use a URL with a token in itor import the data as a file Use the provider’s WMS URLno WMS at all: can’t connect Add &version=1.3.0 still failing? Test the URL with curl -i

Most likely cause: the URL is wrong or incomplete

The WMS GetCapabilities URL field expects the full GetCapabilities request URL. A common mistake is to paste the WMS service’s base URL without the ?service=WMS&request=GetCapabilities query parameters. Here, the swisstopo service’s base URL gets an error because the service sends back an HTML page, not a capabilities document:

Import data page with Data format WMS, the URL https://wms.geo.admin.ch/, and the alert An error occurred while fetching or parsing the WMS data, ending Error: (Unknown code) No service information found in the XML document

How to verify.

Open the URL directly in a new browser tab. A correct GetCapabilities URL returns an XML document that begins with <?xml version="1.0" ...?> and contains <WMS_Capabilities> or <WMT_MS_Capabilities> near the top.

Fix.

If the page is blank, an HTML error, or anything other than XML, append the standard GetCapabilities query parameters:

https://example.com/geoserver/wms?service=WMS&request=GetCapabilities

Some providers also require &version=1.3.0.

Less common: the service is HTTP, not HTTPS

MangoMap only accepts HTTPS GetCapabilities URLs. If yours starts with http://, the form rejects it before sending — you’ll see Only HTTPS URLs are supported instead of the parse error.

Fix.

Try replacing http:// with https://. Most public WMS services support both. If the provider only offers HTTP, the service cannot be connected to MangoMap.

Less common: the service blocks browser requests (CORS)

Some WMS services don’t include the CORS headers that allow a browser to read the response from another origin. The browser fetches the URL fine when you paste it directly, but MangoMap’s request fails because the response isn’t readable.

How to verify.

Open your browser’s developer tools (F12 or ⌘⌥I), watch the Network tab while clicking Connect, and check the failed request for a CORS error in the console.

Fix.

CORS is a server-side configuration. The provider must enable it. If you don’t control the WMS, contact the provider and ask them to add Access-Control-Allow-Origin: * (or your account’s origin) to their WMS responses. There is no client-side workaround.

Less common: the service requires authentication

Some WMS services require credentials. If the URL needs HTTP basic auth or a token, embedding credentials in the URL (https://user:pass@host/...) sometimes works but is unreliable. MangoMap doesn’t have a separate authentication field for WMS.

Fix.

If your provider supports an unauthenticated WMS endpoint or token-in-URL, use that. Otherwise, this service can’t be connected to MangoMap directly — download the data and import it as a vector file instead.

Less common: the response isn’t valid WMS XML

The URL returns something other than a GetCapabilities document — for example, an HTML error page wrapped in XML, a WMTS capabilities document instead of WMS, or a malformed XML response.

How to verify.

The error alert in MangoMap shows the underlying parse error below the main message. If it mentions XML parsing or unexpected elements, the response shape is the problem.

Fix.

Confirm the URL points to a WMS service (not WMTS, not WFS). Try adding &version=1.3.0 to force a specific version.

If none of the above

Test your GetCapabilities URL with curl -i from a terminal. Replace the example URL with yours:

$ curl -i "https://example.com/geoserver/wms?service=WMS&request=GetCapabilities"
HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0" encoding="UTF-8"?>
<WMS_Capabilities version="1.3.0" ...>
  • A 200 OK with XML body confirms the service is reachable from the public internet.
  • A 403, 401, or HTML body points to authentication or routing issues at the provider.
  • A network error confirms the URL is unreachable.

If the URL works in curl and in a browser tab but fails from MangoMap, the most likely remaining cause is CORS — contact the provider.