Announcement

Collapse
No announcement yet.

Canonical Link Issue - Index.html and Variable

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

    Canonical Link Issue - Index.html and Variable

    Hey guys,

    I am running V18 and have a slight issue with a canonical link which I am hoping somone can help with.

    As SellerDeck uses a variable to generate this, the canonical for the homepage is www.domain.co.uk/index.html

    As I use a 301 to redirect /index.html it will be telling Google that the canonical is a 301.

    Now I know this could be debateable whether this is seen as an issue from an SEO point of view, but its something I would like to address.

    Now because it uses a variable for this, I can't just change the canonical so would anyone happen to be savvy enough to come up with an idea for some sort of condition maybe?

    It is only the index.html that I would like to address, everything else is fine.

    I hope this makes sense.

    If you need any code or anything to help me then please let me know.

    Any help would be greatly appreciated.

    #2
    Not exactly the answer you're looking for but if you're redirecting the homepage from index.html page to something else, say 'mypreferredhomepage.html' why not just change the home page name in sellerdeck to be 'mypreferredhomepage.html' ?

    Or is it that you don't want to use the sellerdeck home page and want to use your own page from somewhere else?
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

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

    Comment


      #3
      Hello Mike,

      Code:
      www.theskylightcompany.co.uk/index.html (Which is the Canonical generated by SellerDeck)
      Redirects to
      www.theskylightcompany.co.uk
      I want the re-direct, but to change it so the canonical is not the /index.html. Does this make sense? Or am I missing something really simple to fix this?

      Comment


        #4
        OK. So you want the index.html page to have:

        <link rel="canonical" href="https://www.theskylightcompany.co.uk">

        I suspect the easiest way is by using blockifs to explicitly put that on the homepage and to not put it on any of the other pages.

        i.e. (pseudo code)

        If homepage

        <link rel="canonical" href="https://www.theskylightcompany.co.uk">

        If not homepage

        Standard sellerdeck canonical code

        I think you used to be able to use IsBrochureHomePage but I can't remember if that still works or not.

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

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

        Comment


          #5
          Originally posted by Mike Hughes View Post
          OK. So you want the index.html page to have:

          <link rel="canonical" href="https://www.theskylightcompany.co.uk">

          I suspect the easiest way is by using blockifs to explicitly put that on the homepage and to not put it on any of the other pages.

          i.e. (pseudo code)

          If homepage

          <link rel="canonical" href="https://www.theskylightcompany.co.uk">

          If not homepage

          Standard sellerdeck canonical code

          I think you used to be able to use IsBrochureHomePage but I can't remember if that still works or not.

          Mike
          Hmm, that is what I am after I just think it's a little out of my depth.

          I don't suppose you could offer some none pseudo code?

          Comment


            #6
            I'd have to figure out the correct variable to test against and then test the code to make sure it works. There's a chance I can look at it on Monday, but probably not any earlier. If you're lucky someone else might might join in with the code.
            -----------------------------------------

            First Tackle - Fly Fishing and Game Angling

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

            Comment


              #7
              Originally posted by Mike Hughes View Post
              I'd have to figure out the correct variable to test against and then test the code to make sure it works. There's a chance I can look at it on Monday, but probably not any earlier. If you're lucky someone else might might join in with the code.
              Mike,

              If you could look Monday then that really would be hugely appreciated, I would definitely sort you out a beer or two!

              I have spent too much time trying to do something I cannot do already!

              Thanks Mike for your help.

              Comment


                #8
                Code:
                <actinic:block if="%3cactinic%3avariable%20name%3d%22IsFrontPage%22%20%2f%3e" >
                    CODE FOR FRONT PAGE ONLY HERE
                </actinic:block>
                <actinic:block if="%21%20%3cactinic%3avariable%20name%3d%22IsFrontPage%22%20%2f%3e" >
                    CODE FOR EVERYTHING EXCEPT FRONT PAGE HERE
                </actinic:block>
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  Originally posted by NormanRouxel View Post
                  Code:
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22IsFrontPage%22%20%2f%3e" >
                  CODE FOR FRONT PAGE ONLY HERE
                  </actinic:block>
                  <actinic:block if="%21%20%3cactinic%3avariable%20name%3d%22IsFrontPage%22%20%2f%3e" >
                  CODE FOR EVERYTHING EXCEPT FRONT PAGE HERE
                  </actinic:block>
                  And should I be replacing line 36 within the Meta Tags layout with the above? (<link rel="canonical" href="<actinic:variable name="CanonicalPageURL" />">)

                  There are 2 lines actually that both have <link rel="canonical" href="<actinic:variable name="CanonicalPageURL" />">

                  Line 36 and 49.

                  Sorry if this should be self explanitory for me

                  Comment


                    #10
                    What you want to do is:

                    1. Put the code Norman has given you where the Canonical code is in the meta tags layout.

                    2. Put <link rel="canonical" href="https://www.theskylightcompany.co.uk"> where Norman has put 'CODE FOR FRONT PAGE ONLY HERE'

                    3. Move the rest of the sellerdeck canonical code (including the surrounding blockifs) to where Norman has put 'CODE FOR EVERYTHING EXCEPT FRONT PAGE HERE'


                    Sellerdeck will then put <link rel="canonical" href="https://www.theskylightcompany.co.uk"> on the front page only, the rest of the time it will create the same canonical tags it does currently.
                    -----------------------------------------

                    First Tackle - Fly Fishing and Game Angling

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

                    Comment


                      #11
                      Thank you!!

                      I will have a crack at this in a moment!

                      I really appreciate the help both of you.

                      Comment


                        #12
                        I am not sure if this is what you meant? :|

                        Code:
                        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsFrontPage%22%20%2f%3e" >
                        <link rel="canonical" href="https://www.theskylightcompany.co.uk">
                        </actinic:block>
                        <actinic:block if="%21%20%3cactinic%3avariable%20name%3d%22IsFrontPage%22%20%2f%3e" >
                        <actinic:block if="%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22%29" >
                            <actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsFilteringPageAsDefaultView%22%20%2f%3e%20AND%20%3cactinic%3avariable%20name%3d%22UseStaticFilterPageLink%22%20%2f%3e%29%20OR%20%0d%21%3cactinic%3avariable%20name%3d%22SectionPaginated%22%20%2f%3e%20OR%20%28%28%3cactinic%3avariable%20name%3d%22SectionPaginationIncludeFullPage%22%20%2f%3e%20%3d%3d%201%29%20AND%20%28%3cactinic%3avariable%20name%3d%22SectionPaginationCurrentPageIndex%22%20%2f%3e%20%3e%3d%200%29%29" >        
                                <link rel="canonical" href="<actinic:variable name="CanonicalPageURL" />">
                            </actinic:block>
                            <actinic:block if="%28%28%3cactinic%3avariable%20name%3d%22IsFilteringPageAsDefaultView%22%20%2f%3e%20AND%20%3cactinic%3avariable%20name%3d%22UseStaticFilterPageLink%22%20%2f%3e%29%20%3d%3d%20False%29%20AND%0d%3cactinic%3avariable%20name%3d%22SectionPaginationIncludeFullPage%22%20%2f%3e%20%3d%3d%200" >
                               <!-- Tell search engines how to index paginated sections -->
                                <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionPaginationCurrentPageIndex%22%20%2f%3e%20%3e%201%29" >            
                                    <link rel="prev" href="<actinic:variable name="CanonicalPaginationPreviousPageURL" />">
                                </actinic:block>
                                <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionPaginationCurrentPageIndex%22%20%2f%3e%20%3e%200%29%20AND%20%28%3cactinic%3avariable%20name%3d%22SectionPaginationCurrentPageIndex%22%20%2f%3e%20%3c%20%3cactinic%3avariable%20name%3d%22SectionPaginationLastPartPageIndex%22%20%2f%3e%29" >
                                    <link rel="next" href="<actinic:variable name="CanonicalPaginationNextPageURL" />">
                                </actinic:block>
                            </actinic:block>
                        </actinic:block>
                        <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%22Section%22" >
                            <link rel="canonical" href="<actinic:variable name="CanonicalPageURL" />">
                        </actinic:block>
                        </actinic:block>

                        Comment


                          #13
                          That looks right but the only way to tell is to test it and see what happens. There's not much I can tell by eyeballing it.
                          -----------------------------------------

                          First Tackle - Fly Fishing and Game Angling

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

                          Comment


                            #14
                            Hmm, when viewing Page Source its still pointing the canonical to the /index.html

                            Comment


                              #15
                              Did you publish to web ? and did you force the browser to refresh the page rather than using the cache?
                              -----------------------------------------

                              First Tackle - Fly Fishing and Game Angling

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

                              Comment

                              Working...
                              X