Announcement

Collapse
No announcement yet.

Canonical Tag

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Canonical Tag

    I have noticed some of our related product urls have started showing in search instead of the proper url example

    http://www.retro-sweets-shop.co.uk/c...1450&NOLOGIN=1

    Should be

    http://www.retro-sweets-shop.co.uk/a...-gift-jar.html

    I assume the canonical tag would fix this, I have seen some code on the forum but all the code I have tried gives coding errors.

    Can someone shed some light please.
    Retro Sweets Shop

    #2
    V11 has introduced a no follow tag to the marketing lists, you could use that or you could block your cgi-bin from the search engines completely if not used in your navigation. There is also info in the forum to make marketing lists use plain URLs, i think Gabe posted it a couple of years ago. I'd go with the plain URLs solution, a 5 minute trawl of Gabe's posts would find it.

    Failing that show us what you have done and we can take a look and correct it, 'i've done it and doesn't work' is a bit of a woolley post. Show us the info you followed, show us the code changes you made and provide us with a URL to the page where it is not working. We can then take a look and let you know what is wrong.

    Comment


      #3
      The reason this is happening is because Google is picking up the best seller link that goes via the cgi-bin.

      The best way to avoid this is to block the search engines from the cgi-bin. It's a single line of code in a .htaccess file.

      I'm pretty sure the code has already been posted in the forum. I'll see if I can find it.

      Mike

      Edit: OK. It's easiest to do in the robots.txt file. See http://community.actinic.com/showthread.php?t=29224
      -----------------------------------------

      First Tackle - Fly Fishing and Game Angling

      -----------------------------------------

      Comment


        #4
        @Lee

        I didn't change any code I just added related products through the marketing lists. I will look through Gabes posts to make the related products there own url.
        Thanks

        @Mike

        I will block the cgi bin accordingly
        Thanks
        Retro Sweets Shop

        Comment


          #5
          I would still like to know the code for implementing a canonical tag for each section.
          Retro Sweets Shop

          Comment


            #6
            Originally posted by jim25 View Post
            I have seen some code on the forum but all the code I have tried gives coding errors.
            Originally posted by jim25 View Post
            I didn't change any code
            What does the above mean then?

            Comment


              #7
              Ah I see what you mean

              ok i tried this

              <actinic:block if="%3cactinic%3avariable%20name%3d%22BrochurePageID%22%20%2f%3e%20%3e%200" >
              <link rel="canonical" href="http://www.domain.co.uk/<actinic:variable name="BrochurePageURL" />"/>
              </actinic:block>
              <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%20%3e%200">
              <link rel="canonical" href="http://www.domain.co.uk/acatalog/<actinic:variable name="SectionURL" />"/>
              </actinic:block>

              Which showed errors

              Then I found this

              <link rel="canonical" href="<actinic:variable name="CatalogURL" /><actinic:variable name="SectionPageName" />" />

              Which again showed errors

              I have been placing the code before the head tag.
              Retro Sweets Shop

              Comment


                #8
                It wants to be within the HEAD tag as i understand, not above it, add it where you had it and then show us your HEAD area of your code, i suspect the position of it is just wrong, that's all.

                Comment


                  #9
                  I meant before the closing </head> tag

                  The coding error does not show until I refresh website

                  it says

                  The "SectionPageName" variable has been placed in the "Outer Layout For Silver Theme" layout but it won't work there

                  My Code
                  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
                  <html>
                  <head>
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Contact%20Us%22" >
                  <title>Contact Us</title>
                  </actinic:block>
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Site%20Map%22" >
                  <title>SiteMap</title>
                  </actinic:block>
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Terms%20And%20Conditions%22" >
                  <title>Terms and conditions</title>
                  </actinic:block>
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Search%22" >
                  <title>Search For A Sweet</title>
                  </actinic:block>
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%22Contact%20Us%22%20%7c%7c%20%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%22Site%20Map%22%20%7c%7c%20%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Terms%20And%20Conditions%22" >
                  <title><actinic:variable name="PageTitle" /></title>
                  </actinic:block>


                  <actinic:variable name="BaseHref" />

                  <actinic:variable name="MetaTags" />

                  <actinic:block if="%3cactinic%3avariable%20name%3d%22IsP3PPolicyUsed%22%20%2f%3e" ><link rel="P3Pv1" href="<actinic:variable name="P3PFullPolicyLink" />"></actinic:block>

                  <link href="actinic.css" rel="stylesheet" type="text/css">

                  <style type="text/css">
                  body {
                  background-color: <actinic:variable name="Palette3" />;
                  }
                  </style>

                  <actinic:variable name="JavaScriptFunctions" />

                  <link rel="canonical" href="<actinic:variable name="CatalogURL" /><actinic:variable name="SectionPageName" />" />


                  </head>
                  Retro Sweets Shop

                  Comment


                    #10
                    Instead of:

                    <link rel="canonical" href="<actinic:variable name="CatalogURL" /><actinic:variable name="SectionPageName" />" />

                    Try:

                    <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22"><link rel="canonical" href="<actinic:variable name="CatalogURL" /><actinic:variable name="SectionPageName" />" /></actinic:block>

                    Comment


                      #11
                      As usual Lee your knowledge of Actinic has fixed my problem, I can't thank you enough!!!
                      Retro Sweets Shop

                      Comment

                      Working...
                      X