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

XF 1.3 Can I stop Google indexing an off-topic forum without closing it for guests?

Discussion in 'XenForo Questions and Support' started by CyclingTribe, Jun 23, 2014.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    I'd like to exclude all threads and posts from my off-topic forum from Google's index, but at the same time keep the threads viewable for guests - is this possible?

    Thanks,
    Shaun :D
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    Basically add this to a few templates:

    Code:
    <xen:if is="{$forum.node_id} == 2">
        <xen:container var="$head.noindex">
            <meta name="robots" content="noindex" /></xen:container>
    </xen:if>
    Where 2 is the forum that should be noindex.

    Specifically, thread_view and forum_view but there may be others.
     
    CyclingTribe likes this.
  3. CyclingTribe

    CyclingTribe Well-Known Member

    Thanks Chris - I'll give that a go. (y)
     
  4. CyclingTribe

    CyclingTribe Well-Known Member

    I've ended up using an array in the head section of the PAGE_CONTAINER template:
    Code:
    <xen:if is="in_array({$forum.node_id}, array(x,y,z))">
      <meta name="robots" content="noindex" />
    </xen:if>
    
     
    ForestForTrees and FredC like this.

Share This Page