• 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)

optrex

Active member
#1
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
 

JulianD

Well-known member
#2
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
 

optrex

Active member
#3
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?
 

Brent W

Well-known member
#5
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.
 

MattW

Well-known member
#8
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-->
 

MattW

Well-known member
#9
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-->