You are here:  » Canocical url category


Canocical url category

Submitted by wesse249 on Sat, 2016-04-23 07:08 in

Hello David,

I have a description on my category and merchant pages. Is it possible to add a canocical url to the category and merchant pages?

This is my code for the categorypages:

  if (($parts[0]=="category") || ($parts[0]=="brand") || ($parts[0]=="merchant"))
  if ($page==1)
  {
    $banner["h1"] = "".str_replace(array("merchant","category","brand",":"),"",$q)." aanbieding";
    $banner["description"] = "Op zoek naar een ".str_replace(array("merchant","category","brand",":"),"",$q)." aanbieding? U vindt het hier.<br><br>";
    $banner["description2"]= "<strong>".str_replace(array("merchant","category","brand",":"),"",$q)."</strong> aanbiedingen!";
  }
  require("html/banner.php");

I have also a Canocical url on my productpages. I have therefor this code in my header:

<?php
  
if (isset($product["products"]))
  {
    print 
"<link rel='canonical' href='http://example.com".tapestry_productHREF($product["products"][0])."' />";
  }
?>

Submitted by support on Mon, 2016-04-25 09:42

Hello Jan,

I just wanted to clarify exactly what you wanted the the value of the canonical URL to be and under which circumstances.

The purpose (as I understand it) of a canonical URL is to indicate to search engines that the page is an alternative version of another page, and it is the other page that should be indexed instead. For the merchant / category / brand index pages, and also with the product page, there is not other version so I just wanted to clarify that you wanted a canonical in the header that simply matches the page URL?

Cheers,
David.
--
PriceTapestry.com

Submitted by wesse249 on Thu, 2016-04-28 07:10

Hello David,

You are right. I'm wrong. Thanks for your reaction.

JR