1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Google indexing cookie notice (version 1.2)

Discussion in 'XenForo Questions and Support' started by optrex, Jul 29, 2013.

  1. optrex

    optrex Active Member

    Google started to index one of my new projects today, and I couldn't help but notice the cookie warning is prominent in everything.

    What would be the best way to prevent this from happening? I need the cookie notice, but I dont need it as the description for every forum

    Screen Shot 2013-07-29 at 6.58.31 PM.png
     
  2. JulianD

    JulianD Well-Known Member

    There are several ways to accomplish this. One simple way is using template conditionals.

    Go to http://xenforo.com/community/resources/conditional-statements.1604/

    Look for the search engine conditional.

    Now edit the template that contains the code for your notification and wrap it up in a negated search engine conditional.

    I hope I'm being clear enough for you. I'm in my phone and don't have access to the admin panel so I can't give you exact template names or syntax
     
  3. optrex

    optrex Active Member

    Thanks, that sort of makes sense, but what conditional would be used to allow it to be seen by guests but not indexed by search engines?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Interestingly I don't see this on my or other sites.

    upload_2013-7-29_8-45-1.png
     
  5. BamaStangGuy

    BamaStangGuy Well-Known Member

    I would guess it has something to do with the age of the forums. Brogan has a much more established forum so Google probably has a better time placing a more accurate description on their SERPs.
     
  6. optrex

    optrex Active Member

    I see it on my current 1.1 site too and that has been running for 2 years
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    I'm on 1.2 - updated last week.

    upload_2013-7-29_9-20-20.png
     
  8. MattW

    MattW Well-Known Member

    My main URL displays the cookie notice in the search result (site has been running since 2006)

    cookie.PNG

    There is code you can use to stop Google from pulling in certain content:

    <!--googleoff: index-->
    here will be skipped
    <!--googleon: index-->
     
    BamaStangGuy likes this.
  9. MattW

    MattW Well-Known Member

    So what you could do, is edit the template notice_cookies

    and wrap
    Code:
    {xen:phrase this_site_uses_cookies_notice} <a href="{xen:link help/cookies}">{xen:phrase learn_more}</a>
    in the googleoff code

    Code:
    <!--googleoff: index-->{xen:phrase this_site_uses_cookies_notice} <a href="{xen:link help/cookies}">{xen:phrase learn_more}</a><!--googleon: index-->
     
    Jeremy, optrex and BamaStangGuy like this.

Share This Page