Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Please help, thousand of duplicate meta tag


platnumcn

Recommended Posts

Posted

Hello, when i open google webmater tool, found there is thousand of duplicate meta tag, some page come with 30 different url for same contetn page, and the code in url are very strange, don't know where it come from, the url is like below for same url, the seo url i am using is umliate seo url and header tag seo and canonical_links, anybody know why so much strange url for same content page. Please help.

 

domain/shoes-c-33.html?%252525252525253Blanguage=en

domain/shoes-c-33.html?%2525252525253Bcurrency=GBP?cPath

domain/shoes-c-33.html?;language=en%3F%253Blanguage%3Den?cPath

domain/shoes-c-33.html?page=1&%25253Blanguage=en%253FcPath%253D33%3FcPath&sort=2a

domain/shoes-c-33.html?page=11&%25253Bcurrency=GBP%252525253FcPath%252525253D33%25253FcPath%25253D33&sort=2a

domain/shoes-c-33.html?page=11&;currency=CAD&;amp;language=en%3FcPath%3D33&sort=2a

domain/shoes-c-33.html?page=2&;language=en&sort=2a

domain/shoes-c-33.html?page=2&sort=2a&%3Bsort=2a%2525253FcPath%2525253D33%253FcPath%253D33

domain/shoes-c-33.html?page=3&%25253Bcurrency=GBP&%25253Bamp%25253Blanguage=en%3FcPath%3D33&sort=2a

domain/shoes-c-33.html?page=3&%25253Blanguage=en%253FcPath%253D33%3FcPath&sort=2a

domain/shoes-c-33.html?page=3&sort=2a&%3Bsort=2a%2525253FcPath%2525253D33%253FcPath%253D33

domain/shoes-c-33.html?page=4&%25253Blanguage=en%253FcPath%253D33%3FcPath&sort=2a

domain/shoes-c-33.html?page=4&sort=2a&%2525253Bsort=2a

domain/shoes-c-33.html?page=5&%25253Blanguage=en%253FcPath%253D33%3FcPath&sort=2a

domain/shoes-c-33.html?page=6&%25253Bcurrency=GBP%252525253FcPath%252525253D33%25253FcPath%25253D33&sort=2a

domain/shoes-c-33.html?page=6&%25253Blanguage=en%253FcPath%253D33%3FcPath&sort=2a

domain/shoes-c-33.html?page=7&;currency=CAD&;amp;language=en%3FcPath%3D33&sort=2a

domain/shoes-c-33.html?page=9&%25253Bcurrency=GBP%252525253FcPath%252525253D33%25253FcPath%25253D33&sort=2a

domain/shoes-c-33.html?page=9&;currency=CAD&;amp;language=en%3FcPath%3D33&sort=2a

Posted

If you are using the canonical tag correctly, then those type of warnings will disappear eventually from Google.

Posted

Hello, thanks for your reply, i am using sam's canonicel tag, and canonicel link and url both, but don't know how to set it to remove the messed up url.

 

// remove duplicate content with canonical tag by Spooks 12/2009function CanonicalLink( $xhtml = false , $ssl = 'SSL' ) {global $request_type;$rem_index = true; // Set to true to additionally remove index.php from the uri$close_tag = ( false === $xhtml ? ' >' : ' />' );$spage = '';$domain = ( $request_type == 'SSL' && $ssl == 'SSL' ? HTTPS_SERVER : HTTP_SERVER ); // gets the base URI// Find the file basename safely = PHP_SELF is unreliable - SCRIPT_NAME can show path to phpcgi if ( array_key_exists( 'SCRIPT_NAME', $_SERVER ) && ( substr( basename( $_SERVER['SCRIPT_NAME'] ), -4, 4 ) == '.php' ) ) { $basefile = basename( $_SERVER['SCRIPT_NAME'] ); } elseif ( array_key_exists( 'PHP_SELF', $_SERVER ) && ( substr( basename( $_SERVER['PHP_SELF'] ), -4, 4 ) == '.php' ) ) { $basefile = basename( $_SERVER['PHP_SELF'] ); } else { // No base file so we have to return nothing return false; } // Don't produce canonicals for SSL pages that bots shouldn't see $ignore_array = array( 'account', 'address', 'checkout', 'login', 'password', 'logoff' ); // partial match to ssl filenames foreach ( $ignore_array as $value ) { $spage .= '(' . $value . ')|'; } $spage = rtrim($spage,'|'); if (preg_match("/$spage/", $basefile)) return false;// REQUEST_URI usually doesn't exist on Windows servers ( sometimes ORIG_PATH_INFO doesn't either ) if ( array_key_exists( 'REQUEST_URI', $_SERVER ) ) { $request_uri = $_SERVER['REQUEST_URI']; } elseif( array_key_exists( 'ORIG_PATH_INFO', $_SERVER ) ) { $request_uri = $_SERVER['ORIG_PATH_INFO']; } else {// we need to fail here as we have no REQUEST_URI and return no canonical link html return false; } $remove_array = array( 'currency', 'language', 'main_page', 'page', 'sort', 'ref', 'affiliate_banner_id', 'max', 'gclid'); // Add to this array any additional params you need to remove in the same format as the existing $page_remove_array = array( FILENAME_PRODUCT_INFO => array('manufacturers_id', 'cPath', 'reviews_id', 'keywords', 'gclid', 'filter_id', 'inc_subcat', 'pfrom', 'pto', 'dfrom', 'dto', 'fl'), FILENAME_DEFAULT => array('sort', 'filter_id', 'src', 'OVRAW', 'OVKEY', 'OVMTC', 'OVADID', 'OVKWID', 'ysmwa'), FILENAME_CATEGORIES => array('manufacturers_id', 'cPath', 'reviews_id', 'keywords', 'gclid', 'filter_id'), FILENAME_PRODUCT_REVIEWS => array('manufacturers_id', 'cPath', 'keywords', 'gclid', 'filter_id'), FILENAME_ADVANCED_SEARCH_RESULT => array('manufacturers_id', 'cPath', 'keywords', 'gclid', 'filter_id', 'x', 'y', 'inc_subcat', 'categories_id', 'pfrom', 'pto', 'dto', 'dfrom'), FILENAME_ADVANCED_SEARCH => array('manufacturers_id', 'cPath', 'keywords', 'gclid', 'filter_id') );// remove page specific params, should be in same format as previous, given is manufacturers_id & cPath // have to be removed in product_info.php only if (is_array($page_remove_array[$basefile])) $remove_array = array_merge($remove_array, $page_remove_array[$basefile]); foreach ( $remove_array as $value ) { $search[] = '/&*' . $value . '[=\/]+[\-\]+[\w%..\+]*\/?/i'; } $search[] = ('/&*osCsid.*/'); $search[] = ('/\?\z/'); if ($rem_index) $search[] = ('/index.html\/*/'); $request_uri = preg_replace('/\?&/', '?', preg_replace($search, '', $request_uri )); //XSS isssue resolved here $request_uri = str_replace("<", "<", $request_uri); $request_uri = str_replace(">", ">", $request_uri);$request_uri = str_replace("'", "'", $request_uri);$request_uri = str_replace("\"", """, $request_uri);$request_uri = str_replace(")", ")", $request_uri);$request_uri = str_replace("(", "(", $request_uri); // added this in for home page issues modify if you do not use a sub folder or is a different name for the cart system if (($request_uri == '/catalog/') || ($request_uri == '/catalog/index.php')){ echo '<link rel="canonical" href="' . $domain . '"' . $close_tag . PHP_EOL;}else{ echo '<link rel="canonical" href="' . $domain . $request_uri . '"' . $close_tag . PHP_EOL; }} ///

Posted
Posted

You have to add to Sam's exclusion array, any parameters that you don't want indexed. eg page, currency, language etc. Those URLs will then drop out of the Google index with time.

 

I don't know what is causing the & but I recall reading on the forum somewhere on how to replace that with &, maybe in the SEO URLs support thread.

Posted

Hello, i added sam's arry like this $remove_array = array( 'currency', 'language', 'main_page', 'page', 'sort', 'ref', 'affiliate_banner_id', 'max', 'gclid');

 

it's not work, don't know what array i need to add.

Posted

Hello, i added sam's arry like this $remove_array = array( 'currency', 'language', 'main_page', 'page', 'sort', 'ref', 'affiliate_banner_id', 'max', 'gclid');

 

it's not work, don't know what array i need to add.

 

No, that will work. View your source code to confirm. I wanted to add earlier, that it could take awhile for google to drop those errors/URLs, as in months. It just depends on google.

Posted

Yes it did work, i means it not work to remain remove the ?;&;amp in url,

 

No, that will work. View your source code to confirm. I wanted to add earlier, that it could take awhile for google to drop those errors/URLs, as in months. It just depends on google.

Posted

Hello, i upgrade the ulimate seo url to new version 2.2d, and i made a search for @amp, there is post to teach how to remove the @amp, but what i had was ?;&;amp, can't remove.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...