> ## Documentation Index
> Fetch the complete documentation index at: https://www.mintlify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Fix "Must be a valid url" error for logo.href or navbar.primary.href

> Resolve docs.json validation errors when you use a relative path like /contact in logo.href, navbar.links, or navbar.primary.href.

When you run `mint dev` or `mint validate` with a relative path such as `/contact` in the `logo.href`, `navbar.links[].href`, or `navbar.primary.href` fields of `docs.json`, an outdated CLI reports errors like these:

```text theme={null}
🚨 Invalid docs.json:
#.logo.href: Must be a valid url
#.navbar.primary.href: Must be a valid url
```

Current versions of the Mintlify CLI accept both absolute URLs and relative paths that start with `/` in these fields. Relative paths keep links working across preview deployments, custom domains, and local previews without hardcoding your production domain.

## Update the CLI

Update to the latest CLI version:

```bash theme={null}
mint update
```

If `mint update` isn't available on your version, reinstall the CLI. See [Install the CLI](/docs/cli/install#update) for the reinstall commands.

Then check your version and run validation again:

```bash theme={null}
mint version
mint validate
```

## Example configuration

```json docs.json theme={null}
"logo": {
  "light": "/logo/light.svg",
  "dark": "/logo/dark.svg",
  "href": "/quickstart"
},
"navbar": {
  "links": [
    { "label": "Changelog", "href": "/changelog" }
  ],
  "primary": {
    "type": "button",
    "label": "Contact us",
    "href": "/contact"
  }
}
```

Relative paths must start with `/`. A value like `contact` without a leading slash still fails validation. The `github` and `discord` button types still require a GitHub repository URL or Discord invite URL.

For the full field reference, see [`logo`](/docs/organize/settings-appearance#logo) and [`navbar`](/docs/organize/settings-structure#navbar).


## Related topics

- [Troubleshooting](/docs/api-playground/troubleshooting.md)
- [Navigation](/docs/organize/navigation.md)
- [Files](/docs/create/files.md)
