# Custom URL Scheme

Medis supports `medis:` and `mediss:` URLs for quickly opening Redis connections.

For example, `medis://localhost:6379` will open Medis and connect to the server at `localhost` on port `6379`.

You can specify the database index via the path. For example, to switch to database 2, you would use `medis://localhost:6379/2`.

Username and password are also supported. Use `medis://username:password@localhost:6379` to include both username and password, or simply `medis://password@localhost:6379` if you want to omit the username.

`mediss:` is similar to `medis:`, but it enables SSL for a secure connection.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getmedis.com/reference/custom-url-scheme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
