---
title: "Canonical URL"
description: "Ensure a canonical URL is set to avoid duplicate content issues."
canonical_url: "https://nuxtseo.com/docs/seo-utils/guides/canonical-url"
last_updated: "2026-05-25T04:25:28.077Z"
---

## Introduction

A canonical URL tells search engines which version of a page is the "main" one. Nuxt SEO automatically sets this for you using your site URL and current route path.

Multiple URLs often point to the same content (www vs non-www, trailing slashes). The canonical URL prevents [duplicate content issues](https://support.google.com/webmasters/answer/66359?hl=en)
and confusion for end-users.

Learn more about canonical URLs with the [Canonical Link Tag](/learn-seo/nuxt/controlling-crawlers/canonical-urls) guide.

## Canonical Head Tag

Nuxt SEO automatically sets a canonical URL meta tag for you. This tag is generated from the site URL and the current route path.

```html
<head>
    <!-- ... -->
    <link rel="canonical" href="https://example.com/my-page" />
</head>
```

### Disabling Canonical URLs

If you need to disable automatic canonical URL generation completely, you can do so by setting the canonical URL to `false` in your SEO meta configuration:

```ts [nuxt.config.ts]twoslash
export default defineNuxtConfig({
  seo: {
    meta: {
      canonical: false
    }
  }
})
```

You can also disable it on a per-page basis using `useSeoMeta`:

```ts
useSeoMeta({
  canonical: false
})
```

### canonicalLowercase

By default, the canonical URL is generated in lowercase. This is to ensure that the canonical URL is consistent and avoids any issues with case sensitivity.

While it's recommended to keep this on, if you need to disable this feature, you can do so by setting `canonicalLowercase` to `false`.

```ts [nuxt.config.ts]twoslash
export default defineNuxtConfig({
  seo: {
    canonicalLowercase: false
  }
})
```

### canonicalQueryWhitelist

The canonical URL is generated from:

- `site.url`. Your [Site Config](/docs/site-config/getting-started/introduction) url.
- `$route.path`: The current route path.
- `canonicalQueryWhitelist`: A list of query parameters that should be included in the canonical URL.

By default, the `canonicalQueryWhitelist` includes a number of common query parameters that will modify the page content:

- `page`
- `sort`
- `filter`
- `search`
- `q`
- `category`
- `tag`

You can override this by providing your own list of query parameters that should be included in the canonical URL.

```ts [nuxt.config.ts]twoslash
export default defineNuxtConfig({
  seo: {
    canonicalQueryWhitelist: ['myCustomQuery']
  }
})
```

## Redirect To Canonical

In some cases it may be preferred to redirect all non-canonical URLs to the canonical URL.

This redirect is optional and disabled by default.

```ts [nuxt.config.ts]twoslash
export default defineNuxtConfig({
  seo: {
    redirectToCanonicalSiteUrl: true
  }
})
```
