Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28
  1. #21
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Need help calling variables - trying to set up my own canonical URL handling

    Quote Originally Posted by DrByte View Post
    There's no need to wait before applying that confirmed bugfix.

    You want to be sure that the canonical links it's generating are the ones you want it to produce.
    I'll state it this way: The next time google crawls, it will be told about whatever canonical links you're generating, and will take action accordingly.

    The downside is that if it's generating canonical links that you don't want it to generate, it will rearrange its index the way you don't want it, and if you need to change something you'll have to wait for it to re-index again before it will fix whatever you want fixed, and it may take time for it to rebuild things the way you want them.

    There are many rags/blogs that suggest not to just go throwing canonical urls onto pages without first verifying that it's doing what you want for your site.
    There are many more that go on to say that they recommend not excluding sort or page number parameters, but then there are those that do.
    The only consistent thing you'll find is that nobody really seems to know for sure. Even google doesn't spell it out exactly, but they usually don't anyway.
    Hence my disclaimer.
    Thanks Doc,

    Not worried about sorts and page numbers, I have noindex follow on all of them now as I was getting hundreds of indexed pages with the same titles and descriptions.

    Gonna give the fix and the code a blast now. I'll let you know how I get on :o)

    Thanks for all your valued help

    Phil

  2. #22
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Q

    I LOVE YOU DR BYTE!

    Its working perfectly now.. Going to shoot around my site a bit more to treble check but all pages are passing what I expect, though I have noticed that some products seem to have swapped their master cat ids somewhere along the line doh, but hey, happy to go over and fix that over time...

    Thanks again for pointing out the code for me


  3. #23
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Need help calling variables - trying to set up my own canonical URL handling

    Dr Byte,

    Just need to check something with you as I am not completely sure if it correct now.

    The code you gave me add the canonical link tag to all products. Is that right?

    so for example
    duplicate
    http://www.example.com/test-page
    has: <link rel="canonical" href="http://www.example.com/test" />

    and

    main
    http://www.example.com/test
    has: <link rel="canonical" href="http://www.example.com/test" />

    Is that right? I read here http://googlewebmastercentral.######...canonical.html that the link goes on the duplicate content pages, however in their example they do the same as above. Just want it clarified before I leave it any longer.

    Look forward to hearing back from you

    Phil

  4. #24
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Need help calling variables - trying to set up my own canonical URL handling

    Quote Originally Posted by philip937 View Post
    Dr Byte,

    Just need to check something with you as I am not completely sure if it correct now.

    The code you gave me add the canonical link tag to all products. Is that right?

    so for example
    duplicate
    http://www.example.com/test-page
    has: <link rel="canonical" href="http://www.example.com/test" />

    and

    main
    http://www.example.com/test
    has: <link rel="canonical" href="http://www.example.com/test" />

    Is that right? I read here http://googlewebmastercentral.######...canonical.html that the link goes on the duplicate content pages, however in their example they do the same as above. Just want it clarified before I leave it any longer.

    Look forward to hearing back from you

    Phil
    sorry, forgot to add:

    but a product that is not linked also is like this
    http://www.example.com/notlinked
    has: <link rel="canonical" href="http://www.example.com/notlinked" />

  5. #25
    Join Date
    Apr 2007
    Location
    Herts. UK
    Posts
    890
    Plugin Contributions
    4

    Default Re: Need help calling variables - trying to set up my own canonical URL handling

    Quote Originally Posted by philip937 View Post
    The code you gave me add the canonical link tag to all products. Is that right?
    Some people advise that you only need the canonical link information on non-canonical pages. However, I've been using it on every page since Google introduced it and I've never had a problem.

    Regards,
    Christian.

  6. #26
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Need help calling variables - trying to set up my own canonical URL handling

    I shall follow your lead then :o)

    Thanks for the clarification Christian

  7. #27
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Need help calling variables - trying to set up my own canonical URL handling

    Hi Christian,

    Is it good practice to have a canonical link on the homepage?

    something like the following in tpl_header.php ?

    PHP Code:
    <?php
      
    if ($this_is_home_page) {
    echo 
    '<link rel="canonical" href="http://www.mysite.co.uk/" />';
      }
    ?>

  8. #28
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Need help calling variables - trying to set up my own canonical URL handling

    There's no need for it. I recommend keeping it simple. Otherwise later when you want to change things you'll have too many things to consider, or remember, and could cause yourself troubles.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Need help with a couple of variables
    By BushyTea in forum General Questions
    Replies: 2
    Last Post: 12 Mar 2010, 03:36 AM
  2. Help Calling JQuery?!
    By tjohnson13 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 9 Dec 2009, 06:24 PM
  3. Need a debug tool to read variables
    By ronlee67 in forum General Questions
    Replies: 4
    Last Post: 1 Jun 2009, 04:11 AM
  4. Need User Tracking To Help Display Variables
    By bumba000 in forum General Questions
    Replies: 0
    Last Post: 5 Jan 2008, 08:39 PM
  5. Replies: 8
    Last Post: 26 Apr 2007, 05:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg