Stop Google from Indexing my Events

Home Forums Calendar Products Events Calendar PRO Stop Google from Indexing my Events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1169254
    Rob
    Participant

    Is there a way that I can stop search engines from indexing the events on my site?

    #1169340
    George
    Participant

    Hey Rob,

    Thanks for reaching out!

    To be clear, are you trying to leave everything else on your site searchable and indexable by search engines? So that, i.e., you only want to prevent indexing on events?

    Or do you want to prevent index of all content on your site?

    Cheers,
    George

    #1169386
    Rob
    Participant

    Hi George,

    We have a number of sites that have private area events and do not want google to index these particular events. I figured it may be easier just to block all events from indexing rather than just particular ones.

    What is the best way to accomplish this? Robot.txt file?

    Rob

    #1169550
    George
    Participant

    Hey Rob,

    Thanks for clarifying this a bit.

    It is tricky to target just events, especially a subset of events. However, you do have a few options here.

    You can use robots.txt as you suggest; learn more about using that here → http://www.robotstxt.org

    Another option is to add robots meta tags to the HTML head of any events document…the main /events/ page, single events, etc.

    I wrote up a snippet for you that should do just that:


    if ( class_exists( 'Tribe__Events__Main' ) ) {

    function tribe_limit_search_indexing_of_events() {
    if ( tribe_is_event() ) {
    echo '<meta name="robots" content="noindex, nofollow">';
    }
    }

    add_action( 'wp_head', 'tribe_limit_search_indexing_of_events' );
    }

    ☝️ I tested this and it worked well for me on my local site—in terms of adding the proper meta tags, anyways.

    Like with any limitation imposed on indexing—whether by robots.txt, or .htaccess, or meta tags, etc.—these limitations are requests. It is fundamentally up to the search engines to honor that request.

    So, regardless of what method you choose it may take some time before you notice changes in effect.

    Let me know if this information helps, and if there are any further questions I can try to help with!

    Sincerely,
    George

    #1179182
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Stop Google from Indexing my Events’ is closed to new replies.