Overriding automatically created canonical tag?

There is a setting in Concrete where you can make canonical tag ( <meta rel="canonical" href="...">) appear automatically to every page. But is it possible to override it from the page’s settings?

It’s good that every page has automatically self-referencing URL, but for some pages might have a need to customize the canonical url.

For a particular page you can go into the Page Settings → Location and add a different URL and mark it as Canonical.

If you’re trying to adjust the settings for duplicate content issues due to pagination/searching that’s not currently possible but there is a discussion about it here - https://github.com/concretecms/concretecms/issues/9007

Thanks! I’ve been thinking that canonical url issue with blog topics earlier, now I know that is not solved yet.

Problem at the moment was little different. Our client was asking if they could do something like this with Concrete: They have two pages, article and product, which have almost identical content. They would like to have the product page shown in the Google search results instead of article. But both pages need to be accessible from the website, so adding a new location as canonical is not solving this. Any ideas?

I’m actually not so sure if this even is a good practice to use canonical tag.

To do that you’d have to do 2 things:

  • mark the page so it is not added to the site’s sitemap
  • assuming there is a Google account from which this website is tracked, ask for the article page to be removed from their index

As far as I know, this method is not “permanent”, as Google bots may crawl to the page even if it is not in a sitemap and index it anyway, and the Search Consoles removal tool doesn’t permanently delete the page from index. But probably this is still the best way to deal with this, thanks for the tip!

If you need a second (and third) line of defence after @mnakalay’s solution above, You can specify the pages not to index in your site’s robots.txt file.

Within Concrete you can also use my Conditional Redirect attribute. Configure it to return a 301 redirect when the user agent string identifies the googlebot.

1 Like