Canonical URL Generator
Generate valid canonical tags to avoid duplicate content issues.
Runs in your browser Your input never leaves your device.
About this tool
A canonical tag tells search engines which URL is the preferred version of a page when the same content is reachable at several addresses, for example with tracking parameters or with and without www. This tool takes the URL you type and wraps it in a link element with rel set to canonical. It does not check that the URL exists and does not normalize it, so type the exact address you want indexed. The characters &, double quote and < are HTML-escaped so the attribute stays valid, which means a query string a=1&b=2 appears as a=1&b=2 in the tag. Everything runs in your browser and the tag updates as you type.
How to use it
- Type the full preferred URL, including https://.
- Copy the generated link tag.
- Paste it inside the <head> of the page.
- Use the same URL on every duplicate version of that page.
Example
The URL is placed in the href as typed, with & and quotes escaped.
https://example.com/page
<link rel="canonical" href="https://example.com/page" />
Common problems
- The tag is not applied
- The tag must be in the <head> of the page, not in the body.
- A relative or partial URL was used
- Use an absolute URL with the scheme and domain; the tool does not add them.