Canonical URLs for subpages?

I use the following code to create a canonical specification.
<link rel="canonical" href="<?= $page->url() ?>">

However, the results (URL) for the following subpages:
…/work/page:2
…/work/tag:Term
is always the same URL for subpages, namely: …/work

My questions:

  1. is this OK for the correct SEO-thinking, that the subpages are ‘canonicalised’?
  2. if not, how do I get these possible parameters (‘/page:2’ or ‘/tag:Term’) into the URL output in KIRBY?

Thanks

That’s exactly why you want to use canonical links. Putting the parameters into the canonical URL would render the canonical url useless.

1 Like

Thanks :slight_smile:

Oh - I always thought that when the URL of a subpage is “canonicalized” to its main page, that the search engines are then instructed not to index the links of this subpage (e.g. page 2 of an overview page). Right?
But I’ve never quite got to grips with SEO-thinking.

Parametrized Urls are not “subpages”. The reason you use canonical URLs for such URLs is not to cannibalize the ranking of your main page, and therefore tell search engines to index the main page, rather than those parametrized URLs.