<!-- llms-explorer concept facts · https://llms-explorer.com/tree/standard-uri-format/ · pack 2026-10-23 · ~693 tokens -->

# Standard URI Format

> Source-anchored research for Standard URI Format. Run status: COMPLETED.

Parent: [MongoDB Connection String URI](https://llms-explorer.com/tree/mongodb-connection-string-uri/) · 4 facets · 7 facts · page: https://llms-explorer.com/tree/standard-uri-format/

## Structure and components

- The standard MongoDB connection string has the form `mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]`: credentials are optional, the host list can contain multiple `host[:port]` entries, and the database path and query options are optional. (high confidence) — [source](https://www.mongodb.com/docs/manual/reference/connection-string-formats.md)

## How it works

- When a port is omitted from a standard MongoDB URI, the default port is `27017`. (high confidence) — [source](https://www.mongodb.com/docs/manual/reference/connection-string-formats.md)

## Problems, failure modes and limitations

- The MongoDB driver specification describes connection strings as URI-style but says their grammar does not conform to RFC 3986 and cannot be parsed by generic URI parsers; applications need a parser that understands MongoDB connection strings. (medium confidence) — [source](https://github.com/mongodb/specifications/blob/master/source/connection-string/connection-string-spec.md)

## Facts and statements

- The SRV form is `mongodb+srv://[username:password@]host[/[defaultauthdb][?options]]`; it accepts one hostname without an explicit port, then the driver queries DNS SRV records to discover the hosts. (high confidence) — [source](https://www.mongodb.com/docs/manual/reference/connection-string-formats.md)
- Connection options use `?name=value` query parameters; if options appear without a database path, include `/` between the last host and `?`. (low confidence) — [source](https://www.mongodb.com/docs/manual/reference/connection-string-formats.md)
- For portable credentials, percent-encode `$ : / ? # [ ] @` in MongoDB usernames and passwords. RFC 3986 defines a percent-encoded octet as `%` followed by two hexadecimal digits; the MongoDB connection-string specification says drivers should follow RFC 3986 userinfo rules but may accept some reserved characters unencoded for backward compatibility. (high confidence) — [source](https://www.mongodb.com/docs/manual/reference/connection-string-formats.md)
- MongoDB's current documentation differs on replica-set seed completeness: the Manual says standard connection strings require all cluster members, while the SDAM specification and current .NET/C# guide describe discovery from a seed list containing one or more members. (medium confidence) (verified as of 2026-10-23) — [source](https://www.mongodb.com/docs/manual/reference/connection-string/)
