Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Detailed pages in more than 1 category - avoiding Duplicate Contenet in Search Engines

Quote Reply
Detailed pages in more than 1 category - avoiding Duplicate Contenet in Search Engines
Hi this is another question about how to fix a canonicalization issue with regard to pages with duplicate content

This can / will occur if you have a Detailed pages enabled and links that are in more than 1 category

Example here for link ID123

http://www.******.com/Detailed/1st_category/2nd_category/3rd_category/page_123.html
http://www.******.com/Detailed/1st_category/2nd_category/page_123.html
http://www.******.com/Detailed/1st_category/page_123.html

Google have a page about this on their webmaster support section, about the issue of web pages that may be referenced by multiple / different urls

http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=139066

One solution they suggest is to "add a <link> element with the attribute rel="canonical" to the <head> section of the non-canonical pages" telling the search engine which is the MASTER copy of the page

<link rel="canonical" href="http://www.******.com/Detailed/1st_category/2nd_category/3rd_category/page_123.html">

Is there any way to get this canonical <link> code into the 'duplicate' pages?

Any other suggestion to avoid having duplicate pages when trying to list a link listing in more than 1 category?

Thanks
Colin Thompson
Quote Reply
Re: [colintho] Detailed pages in more than 1 category - avoiding Duplicate Contenet in Search Engines In reply to
I don't have my build set up the same way as you but I can't see that there is a dupe problem. As far as I was aware only one detailed page is created no matter how many categories you put it under....
Quote Reply
Re: [chapelier] Detailed pages in more than 1 category - avoiding Duplicate Contenet in Search Engines In reply to
Quote:
As far as I was aware only one detailed page is created no matter how many categories you put it under....

Thats correct.. it builds the detailed page for the first category it finds in the CatLinks table for that listing.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [colintho] Detailed pages in more than 1 category - avoiding Duplicate Contenet in Search Engines In reply to
Thinking about it - why not use a custom global to make the detailed_url field? (this way, it wouldn't matter what category it was in - the URL would show only 1, even though it exists in more than one category:

custom_detailed
Code:
sub {
my $detailed_url = $CFG->{build_detail_url} . "/" . $DB->table('Links')->detailed_url( $_[0] );
return { detailed_url => $detailed_url }
}

Code:
<%custom_detailed($ID)%>
<a href="<%detailed_url%>"><%Title%></a>

This should then just make a SINGLE detailed URL for the listing - no matter what category its listed in. Untested, but should do the trick.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages in more than 1 category - avoiding Duplicate Contenet in Search Engines In reply to
Andy

thanks, it works, I inserted the code into the links.html page, then did a build and checked some of the 'detailed page' links from some of the categories and they appeared to be using 1 detailed page url for each link listing (as you said it would)

just need to sort out the 'sitemap.xml' - I'll post a message on their support forum

When I did a sitemap 'crawl' using "XML-Sitemap Generator" it still picked up all the 'detailed pages' with the number of url's crawled changing from 5817 down to 4977
Colin Thompson
Quote Reply
Re: [colintho] Detailed pages in more than 1 category - avoiding Duplicate Contenet in Search Engines In reply to
Andy

regarding the 'Detailed page' URL ... I inserted the code just before the 'detailed_url' code in the links.html and link_short.html templates

This worked for the detailed page links in the listings on the category pages, 1 detailed page URL for each listing irrespective of the listing being in 2 or more categories.

So I'm trying to find where else the detailed pages are linked from that may have caused the xml sitemap + Google to find multiple detailed pages for the same listing

My site uses the Google category maps plugin, would this code have any effect on the location markers links to the detailed pages?

Also, when viewing each Detailed page there are links for < Previous | Next > previous url & next url detailed pages, would this code work here?

Thanks
Colin Thompson
Quote Reply
Re: [colintho] Detailed pages in more than 1 category - avoiding Duplicate Contenet in Search Engines In reply to
Mmm, this is where an issue may come up. I just looked at Links::Table::Links.pm::detailed_url() , and I'm not 100% sure how that works - so wouldn't wanna suggest any changes to that (so that it only grabs the first CatLinks.CategoryID value it finds for a link).

Maybe someone from GT can suggest a change (although this change would be overwritten with any upgrades etc, so isn't really the ideal sollution)

To do stuff with the "next" and "prev" detailed URLs, I'm afraid its a lot harder (would probably need a global to find the linkID, and then based on that grab the detailed URL through the global I gave you). However, not something I can spend time doing for free, sorry (has potential to take a while :()

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!