---
title: "Exclude Links"
description: "Exclude links from being checked by the Nuxt Link Checker."
canonical_url: "https://nuxtseo.com/docs/link-checker/guides/exclude-links"
last_updated: "2026-05-11T18:31:37.139Z"
---

Exclude URLs from inspection by adding them to the `excludeLinks` array. This prevents specific links from being checked on **any** page where they appear.

To skip all link checking on certain pages entirely, see [Exclude Pages](/docs/link-checker/guides/exclude-pages).

## Default Exclusions

The following patterns are excluded by default:

- `/_*` paths (Nuxt internal routes such as `/_nuxt/*`, `/_payload.json`)
- `/llms.txt` and `/llms-*.txt` (typically generated at build time, e.g. `/llms-full.txt`)

If any `app.baseUrl` is defined in the nuxt configuration, then it will be *automatically added* to the links exclusion list in order to avoid misleading warnings during build due to `<NuxtLink>` handling of links to `"/"` i.e. to the root of the nuxt app.

Until nuxt-link-checker v5.0.7, `<NuxtLink to:"/">home</NuxtLink>` and similar were triggering some warning during the app compilation/build. See [Exclude links to the application root](#exclude-links-to-the-application-root) below.

## Pattern Types

Three pattern types are supported. They are evaluated in order: RegExp first, then exact string match, then wildcard.

### Exact Matches

```ts
export default defineNuxtConfig({
  linkChecker: {
    excludeLinks: [
      '/about',
      '/contact',
    ],
  },
})
```

### Wildcards

Uses [radix3](https://github.com/unjs/radix3) route matching. `*` matches a single path segment, `**` matches any number of segments.

```ts
export default defineNuxtConfig({
  linkChecker: {
    excludeLinks: [
      '/admin/**', // All admin routes
      '/api/*', // Direct children only (/api/users, not /api/users/1)
      '/blog/*/comments', // Nested wildcards
    ],
  },
})
```

<callout type="warning">

Wildcard patterns use route matching, not glob matching. `/_nuxt/file_*.pdf` will **not** work because `*` only matches full path segments. Use a RegExp pattern instead for partial segment matching.

</callout>

### Regular Expressions

For advanced matching (partial segments, file extensions, numeric patterns), use RegExp:

```ts
export default defineNuxtConfig({
  linkChecker: {
    excludeLinks: [
      /^\/blog\/\d+$/, // Blog posts with numeric IDs
      /\.(pdf|zip)$/, // File downloads
      /\/_nuxt\/.*\.pdf/, // Nuxt asset PDFs
    ],
  },
})
```

### External Links

```ts
export default defineNuxtConfig({
  linkChecker: {
    excludeLinks: [
      'https://example.com/**',
      /^https:\/\/.*\.example\.com/,
    ],
  },
})
```

## Common Use Cases

### Exclude Vite Asset URLs

When importing assets with `?url`, [Vite](https://vite.dev) generates hashed filenames that trigger false positives. Use a RegExp to match them:

```ts
export default defineNuxtConfig({
  linkChecker: {
    excludeLinks: [
      /\/_nuxt\/.*\.pdf/, // All PDF assets
    ],
  },
})
```

### Exclude Dynamic Routes

If you have dynamic routes that aren't prerendered:

```ts
export default defineNuxtConfig({
  linkChecker: {
    excludeLinks: [
      '/user/**',
      '/products/**',
    ],
  },
})
```

### Exclude Auth-Protected Routes

```ts
export default defineNuxtConfig({
  linkChecker: {
    excludeLinks: [
      '/dashboard/**',
      '/profile/**',
    ],
  },
})
```

### Exclude Hash Links

```ts
export default defineNuxtConfig({
  linkChecker: {
    excludeLinks: [
      /#.*/, // All hash links
    ],
  },
})
```

### Exclude links to the application root

** not required anymore when using *nuxt-link-checker version > v5.0.7* **

To avoid warnings due to `<NuxtLink>` handling of links to `"/"` (app root aka "home") in case of a configured `app.baseUrl`, the `baseUrl` should be added to the **excludeLinks** list.

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  app: {
    baseUrl: '/nuxt-app-root-path-on-server/'
  },
  linkChecker: {
    excludeLinks: [
      '/nuxt-app-root-path-on-server/', // exclude baseUrl to avoid warnings
    ],
  },
})
```
