MongoDB's Expanding Hyphens in URL’s with Cluster URL’s

    Table of contents

    We have seen customers trip up over a very subtle problem with the expansion from the mongodb+srv URL to the cluster URLs.

    If your mongodb+srv URL is with a hyphen (-) between yourhost and abcd123. That means when you do the URL expansion for the tunnels, you need to use the hyphen as well.

    So that would mean your tunnels need to be setup as:

    Note the hyphens instead of the periods before abcd123.

    The same is true if you use a “.” in the mongodb+srv URL, for example

    Hopefully this helps avoid this slight pitfall and gets you up and running. If you’re still having problems, write to us at Support.

    Ready to Get Started?

    Get in touch or create a free trial account