canonical still need improve. Osclass V 8.1.2 latest
Home page - no canonical link
Search page - work fine
item page - no canonical link
static page - no canonical link
faq / companies - main + sub - no canonical link
keyword search pages - no canonical link
----------------------------------------------------------------------- But I am fixed my way, still need improvement.
Check my code, you can test & use.
<?php if(Params::getParam('iPage') == 1 || osc_get_canonical() != '') { ?>
<link rel="canonical" href="<?php echo osc_get_canonical(); ?>"/>
<link rel="alternate" href="<?php echo "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>" hreflang="en-in" />
<?php } else { ?>
<link rel="canonical" href="<?php echo "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>" />
<link rel="alternate" href="<?php echo "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>" hreflang="en-in" />
<?php } ?>
You can follow this
https://free-classifieds-usa.com/ website structure. perfect canonical working.
How this person achieve ...? want same solution.
Team, kindly check & fix this IMP problem.