Sometimes The Events Calendar creates multiple links that are indexed by search engines. This may cause some SEO and performance issues on your website. The good news is that you can add a noindex meta tag to your header to block this duplicate content.

Block duplicate content

If there are no events for a specific URL that you see multiple links created for, add the following noindex meta tag to your page’s header:

<meta name="robots" content="noindex">

You can also block undesired/empty pages from being crawled by Google and other search engines by disallowing some paths on the robots.txt file.

You can add a robots.txt file to your server root folder or use SEO plugins to manage it.

The following parameters will help block some WordPress folders and URLs, and also Events Calendar parameters:

## For WordPress

User-agent: *
Disallow: /wp-admin/*
Disallow: /wp-login.php
Disallow: /wp-includes/*
Disallow: /wp-content/*
Disallow: /trackback
Disallow: /feed
Disallow: */comments
Disallow: ?replytocom*
Disallow: */comments-page-*
Disallow: */trackback
Disallow: */feed
Disallow: */comments

Allow: /wp-content/cache/*
Allow: /wp-content/uploads/*
Allow: /wp-content/themes/*
Allow: /wp-content/plugins/*
Allow: /wp-includes/js/*
Allow: /wp-includes/css/*

## For Events Calendar
Disallow: *post_type=tribe_events*
Disallow: *hide_subsequent_recurrences=*
Disallow: *tribe-bar-date=*
Disallow: *tribe-venue=*
Disallow: *eventDisplay=*
Disallow: *eventDate=*
Disallow: *paged=*
Disallow: *pagename=*
Disallow: *shortcode=*
Disallow: *ical=*
Disallow: *outlook-ical=*
Disallow: *related_series=*
Disallow: *tribe_geofence=*

Allow: /events/*
Allow: /event/*

With the Yoast SEO plugin, you can edit your robots.txt file under wp-admin > Yoast SEO > Tools > File editor. Read more in their documentation here.

Using the Rank Math SEO plugin, you can edit the robots.txt file under wp-admin > Rank Math > General Settings > Edit robots.txt. Documentation here.

Add noindex to page headers

You can add noindex to the desired page headers to block duplicate content. The way that you do this will vary depending on the SEO plugin that you use and the page where you’d like to make this change.

The following is an example snippet that adds noindex on the Recurring Events page, and you can add it to your functions.php file when using Yoast SEO:

if(class_exists('WPSEO_Options')){ 
add_filter("wpseo_robots", function($robots) {
	global $wp_query;
		if ( $wp_query->tribe_is_recurrence_list && 'all' === $wp_query->get( 'eventDisplay' )) {
        	return "noindex";
    	}
        return $robots;
	});
}

If you are using Rank Math, here is the example snippet using the proper filters for that plugin:

add_filter( 'rank_math/frontend/robots', function ( $robots ) {
    global $wp_query;
    if ( $wp_query->tribe_is_recurrence_list && 'all' === $wp_query->get( 'eventDisplay' )) {
        unset( $robots['index'] );
	    $robots['noindex'] = 'noindex';
    }
    return $robots;
});