[**@wocart/storefront v3.1.0**](../../README)

***

[@wocart/storefront](../../README) / [index](../README) / canonicalUrl

# Function: canonicalUrl()

> **canonicalUrl**(`origin`, `page`, `search?`): `string`

A page's canonical address: its path in its language on `origin`, keeping
only the listing page it shows (`?page=2`). An order (`?sort=`), a search,
an ad's click id (`fbclid`, `utm_*`) or a coupon in the address is the same
page to a search engine, and a canonical that kept them would split one
page into many.

## Parameters

### origin

`string`

### page

[`CanonicalPage`](../interfaces/CanonicalPage)

### search?

`string` \| `URLSearchParams`

## Returns

`string`
