# gatsby-plugin-clean-canonical-urls

> Add canonical links to HTML pages Gatsby generates.

Latest version **1.0.0** (published 2019-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-plugin-clean-canonical-urls
pnpm add gatsby-plugin-clean-canonical-urls
yarn add gatsby-plugin-clean-canonical-urls
bun add gatsby-plugin-clean-canonical-urls
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-03-22 |
| First published | 2019-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mark Salabutin |
| Maintainers | msalabutin |
| Keywords | gatsby, gatsby-plugin |

## Links

- npm: https://www.npmjs.com/package/gatsby-plugin-clean-canonical-urls
- npm.io page: https://npm.io/package/gatsby-plugin-clean-canonical-urls

## Dependencies (1)

- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.0.0

## Recent versions

- 1.0.0 (latest) — 2019-03-22

## README

# gatsby-plugin-clean-canonical-urls

Add canonical links to HTML pages Gatsby generates.

This implementation is primarily helpful for distinguishing between https/http,
www/no-www but could possibly be extended to help with when sites add multiple
paths to the same page.

## Install

`npm install --save gatsby-plugin-clean-canonical-urls`

## How to use

```javascript
// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-plugin-clean-canonical-urls`,
    options: {
      siteUrl: `https://www.example.com`,
    },
  },
]
```

With the above configuration, the plugin will add to the head of every HTML page
a `rel=canonical` e.g.

```html
<link rel="canonical" href="https://www.example.com/about-us/" />
```

---
_Source: https://npm.io/package/gatsby-plugin-clean-canonical-urls · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
