*

pipetko

  • ****
  • 123 posts
Missing canonical url tag
« on: August 22, 2021, 10:01:07 PM »
I havent watched recently the code, but for some reason there is no more canonical url tag on the pages..... WHY ?! I have migrated all websites to OC 4 the last version from osclasspoint and its all the same with missing canonical tag on ads / pages
« Last Edit: August 22, 2021, 10:20:12 PM by pipetko »

*

MB Themes

Re: Missing canonical url tag
« Reply #1 on: August 23, 2021, 08:14:34 AM »
@pipetko
Canonical URL should be on duplicated search pages, but there has been done some improvements so it is not always showing.
You could add it in controller/search.php, bellow this line:
Code: [Select]
$this->_exportVariableToView('search', $this->mSearch);
add:
Code: [Select]
$this->_exportVariableToView('canonical', $searchUri);
There are few problems now:
1) canonical url should follow to unique url in case of duplicated content, which one it should be?
2) when it should show, always, or just in case of weird url?
3) what about search pages with no listings, what is their canonical?
4) google used to mark as canonical all pages on pagination, but first one no. That does not sound like best way to do it.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots