homepage Welcome to WebmasterWorld Guest from 54.161.155.142
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
Rel canonical pointing to itself
stephang




msg:3993944
 5:48 am on Sep 23, 2009 (gmt 0)

Hello.

I have a small question that I can't get an answer to.
I assume everybody heard about rel canonical,.. ok.

So my issue is..
I have Page A, and Page B.
I have to put a rel canonical tag on Page B, so that it points to Page A.

However, since it is the exact same page(dynamic content), if I put a rel canonical tag on Page B, it also appears on page A.

So basically, Page A is also pointing to Page A.

Did anybody had the same issue?..
It is ok for the canonical page to have a 'link rel="canonical"' pointing to itself?

Thank you very much !

 

Receptional Andy




msg:3993972
 8:12 am on Sep 23, 2009 (gmt 0)

There's no problem with having a canonical attribute referencing the current URL. This is expected behaviour on many sites

stephang




msg:3993975
 8:21 am on Sep 23, 2009 (gmt 0)

Thanks for the quick reply. Greatly appreciated!

jd01




msg:3993989
 9:10 am on Sep 23, 2009 (gmt 0)

Why can't you just find the requested URI and turn it off or on?
In PHP it could look something like this:

if(strstr($_SERVER['REQUEST_URI'],"PageB.html")) {
$AddTheRel="<rel link here>";
}

OR if you are using Query_Strings, maybe like this:

if(strstr($_SERVER['QUERY_STRING'],"PageB")) {
$AddTheRel="<rel link here>";
}

ADDED:
Sorry if I sound blunt, it's late here. =)

johnnie




msg:3994042
 11:20 am on Sep 23, 2009 (gmt 0)

There's no problem with doing that at-all.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved