+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Canonical URLs link (tags) plugin

  1. #1
    Senior Member
    Join Date
    Aug 2010

    Canonical URLs link (tags) plugin

    Canonical URL link (tag) in between head sections of the HTML code, will benefit website for SEO purpose.
    Example canonical link (tag):
    <link rel="canonical" href="http://www.flynax.com/" />
    <link rel="canonical" href="http://www.flynax.com/features.html" />

    This will reduce a duplicate content issue with search engines!
    This link should be added to all important pages, such as categories.

    For example:
    The canonical link for the page URls below should be as following:
    <link rel="canonical" href="http://www.flynax.com/features.html" />

    Sample page URLs:

    (all the pages above; the search engine consider as the same pages. In this case, the canonical link (tag) will tell search engine where the main URL is located)

    This is will avoid PENALTY of the search engines for duplicate content on the website.
    Last edited by PGGO; April 27, 2012 at 04:56 AM.

  2. #2
    It's very simple to do :

    open the header.tpl of your theme (/templates/yourtemplate/tpl/header.tpl) and search

    <meta name="keywords" content="{$pageInfo.meta_keywords|strip_tags}" />
    add after

    <link rel="canonical" href="{$pageInfo.canonical}" />

    after it, open the file common.inc.php in the includes folder, search :

    /* send headers */
    header("Content-Type: text/html; charset=utf-8");
    header("Cache-Control: store, no-cache, max-age=3600, must-revalidate");
    and add after this code:

    $page_info['canonical'] = RL_URL_HOME;
    $page_info['canonical'] .= $config['mod_rewrite'] ? parse_url(substr($_SERVER['REQUEST_URI'],1),PHP_URL_PATH) : "index.php?".$_SERVER['QUERY_STRING'];

  3. #3
    I dont really understand what this do. Is this good to implement to the site ?
    Can anyone tell me in details what this do ?

  4. #4
    Here some informations : http://en.wikipedia.org/wiki/Canonical_link_element

    Google penalizes websites where find duplicate elements. But sometimes Google arrive to one page from two or more links, and don't understand that this page is the same page.

    With canonical tag you help google to understand that it's not a duplicate and save your website from penalize.

  5. #5
    Senior Member
    Join Date
    Aug 2010

    Thank you very much!

    It works great.

  6. #6
    You welcome ;-)

  7. #7
    Hello Fabricio, I just found the thread, thanks very much for posting it! I'm having quite a lot of duplicate content from my site in Google and I'm sure this is going to help, thanks again!


  8. #8
    I'm pretty sure this doesn't really work.

    When I go to my website normally it produces:
    <link rel="canonical" href="http://www.MyDomain.com/" />

    And when I add "/index.php" to the end of the URL I see in the source:
    <link rel="canonical" href="http://www.MyDomain.com/index.php" />

    I can also generate:
    <link rel="canonical" href="http://www.MyDomain.com/about-us.html" />


    <link rel="canonical" href="http://www.MyDomain.com/about-us/" />

    I think the whole point of canonical is to have it pick one version and always use it for the same page, so duplicates aren't indexed by google. Anyone have ideas for solving this?

    Thank you

  9. #9
    Hi all

    after it, open the file common.inc.php in the includes folder, search : includes>controllers>common.inc.php right directory
    Thanks PGGO,ATServiceSRL

  10. #10
    Hi Gen82,
    Yes I think ATServiceSRL meant the "includes>controllers>" directory.

    I tried that, but it really isn't solving the canonical issue.

    There are still several URL versions of each page, all of them specifying a canonical tag that they are the true version.

    Both of these pages should contain the exact same canonical tag which should specify the main version of the about us page.

    Also, does anyone know which is a better format, with ".html" or without? It seems like the site uses ".html". Is that best?

    Thanks all.

+ Reply to Thread