On certain pages of my website I use URL parameters on links:

<a href="/example/?parameter=value">Click here</a>

The target URL is always exactly the same (i.e. /example/). With exactly the same content.

The URL parameter only serves the purpose of being used as a hidden form field in a form on that page. So that I can identify the page the user has visited before actually submitting that form.

My question: How do I correctly set the canonical to prevent the target page to be indexed multiple times?

Only on the actual target page in the head like this?

<link rel="canonical" href="https://www.example.com/example/" />

Or should I also do it on the actual original link? How would I ideally solve this?

Currently, the tool ahrefs.com claims those pages as "Duplicate pages without canonical" although I have already set the self-referencing canonical on the target page like this <link rel="canonical" href="https://www.example.com/example/" />.

1 Answer 1


Canonical is used to determine which page is the real one that you want the search bots to know about when crawling your site.

It is used when there are duplicate pages of the same one.

So if you have:


which is the same as:


Then you are correct to put the tag inside /example/?parameter=value pointing to the original page.

See more at google webmasters and moz for best practices.

Hope this helps.

  • Thanks! How exactly would I add the canonical to my ahref then? And in regards to self-canonicalization: Moz itself says it's possible - see here: moz.com/learn/seo/canonicalization
    – Alex
    Commented Apr 11, 2020 at 11:32
  • 3
    Yes you're right about self-canonicalisation! I don't know what you mean by how to add it to your ahref? It wouldn't go in the anchor tag, it should appear as a tag in the head part of your HTML. <link rel="canonical" href="https://www.example.com/example/" />
    – Abu Nooh
    Commented Apr 11, 2020 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.