{"id":1952348,"date":"2022-03-18T05:25:08","date_gmt":"2022-03-18T09:25:08","guid":{"rendered":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/?post_type=tribe-knowledgebase&#038;p=1952348"},"modified":"2024-08-07T17:56:03","modified_gmt":"2024-08-07T21:56:03","slug":"seo-and-performance-issues","status":"publish","type":"post","link":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/seo-and-performance-issues\/","title":{"rendered":"SEO and Performance Issues"},"content":{"rendered":"\n<p>Sometimes <a href=\"https:\/\/theeventscalendar.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">The Events Calendar<\/a> 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 our plugin adds a <em>noindex<\/em> meta tag to your page header if t here&#8217;s no events listed on that page, to block this duplicate content.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-block-duplicate-content\">Block duplicate content<\/h2>\n\n\n\n<p>If there are no events for a specific URL that you see multiple links created for, TEC adds the following <em>noindex<\/em> meta tag to your page&#8217;s header:<\/p>\n\n\n\n<p><code>&lt;meta name=\"robots\" content=\"noindex\"&gt;<\/code><\/p>\n\n\n\n<p>You can also block Google and other search engines from crawling undesired\/empty pages by disallowing some URL paths in the\u00a0<a href=\"https:\/\/developers.google.com\/search\/docs\/advanced\/robots\/intro\" target=\"_blank\" rel=\"noreferrer noopener\">robots.txt<\/a>\u00a0file.<\/p>\n\n\n\n<p>To achieve that, you can add a robots.txt file to your server&#8217;s root folder or manage it using SEO plugins.<\/p>\n\n\n\n<p>The following parameters will help block some WordPress folders and URLs, and also Events Calendar parameters:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n## For WordPress\n\nUser-agent: *\nDisallow: \/wp-admin\/*\nDisallow: \/wp-login.php\nDisallow: \/wp-includes\/*\nDisallow: \/wp-content\/*\nDisallow: \/trackback\nDisallow: \/feed\nDisallow: *\/comments\nDisallow: ?replytocom*\nDisallow: *\/comments-page-*\nDisallow: *\/trackback\nDisallow: *\/feed\nDisallow: *\/comments\n\nAllow: \/wp-content\/cache\/*\nAllow: \/wp-content\/uploads\/*\nAllow: \/wp-content\/themes\/*\nAllow: \/wp-content\/plugins\/*\nAllow: \/wp-includes\/js\/*\nAllow: \/wp-includes\/css\/*\n\n## For Events Calendar\nDisallow: *post_type=tribe_events*\nDisallow: *hide_subsequent_recurrences=*\nDisallow: *tribe-bar-date=*\nDisallow: *tribe-venue=*\nDisallow: *eventDisplay=*\nDisallow: *eventDate=*\nDisallow: *paged=*\nDisallow: *pagename=*\nDisallow: *shortcode=*\nDisallow: *ical=*\nDisallow: *outlook-ical=*\nDisallow: *related_series=*\nDisallow: *tribe_geofence=*\nDisallow: *tribe_organizer=*\n\nAllow: \/events\/*\nAllow: \/event\/*\n<\/pre><\/div>\n\n\n<p>With the <a href=\"https:\/\/wordpress.org\/plugins\/wordpress-seo\/\" target=\"_blank\" rel=\"noreferrer noopener\">Yoast SEO<\/a> plugin, you can edit your robots.txt file under <em>wp-admin &gt; Yoast SEO &gt; Tools &gt; File editor<\/em>. Read more in their documentation <a href=\"https:\/\/yoast.com\/help\/how-to-edit-robots-txt-through-yoast-seo\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p>Using the <a href=\"https:\/\/wordpress.org\/plugins\/seo-by-rank-math\/\" target=\"_blank\" rel=\"noreferrer noopener\">Rank Math SEO<\/a> plugin, you can edit the robots.txt file under <em>wp-admin &gt; Rank Math &gt; General Settings &gt; Edit robots.txt<\/em>. Documentation <a href=\"https:\/\/rankmath.com\/kb\/how-to-edit-robots-txt-with-rank-math\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-add-noindex-to-page-headers\">Add noindex to page headers<\/h2>\n\n\n\n<p>You can add <em>noindex<\/em> 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&#8217;d like to make this change.<\/p>\n\n\n\n<p>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 <em>Yoast SEO<\/em>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nif(class_exists(&#039;WPSEO_Options&#039;)){ \nadd_filter(&quot;wpseo_robots&quot;, function($robots) {\n\tglobal $wp_query;\n\t\tif ( $wp_query-&gt;tribe_is_recurrence_list &amp;&amp; &#039;all&#039; === $wp_query-&gt;get( &#039;eventDisplay&#039; )) {\n        \treturn &quot;noindex&quot;;\n    \t}\n        return $robots;\n\t});\n}\n<\/pre><\/div>\n\n\n<p>If you are using <em>Rank Math<\/em>, here is the example snippet using the proper filters for that plugin:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;rank_math\/frontend\/robots&#039;, function ( $robots ) {\n    global $wp_query;\n    if ( $wp_query-&gt;tribe_is_recurrence_list &amp;&amp; &#039;all&#039; === $wp_query-&gt;get( &#039;eventDisplay&#039; )) {\n        unset( $robots&#x5B;&#039;index&#039;] );\n\t    $robots&#x5B;&#039;noindex&#039;] = &#039;noindex&#039;;\n    }\n    return $robots;\n});\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>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 our plugin adds a noindex meta tag to your page header if t here&#8217;s no events listed on that page, to block this duplicate content. Block&#8230;<\/p>\n","protected":false},"author":31,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[40],"tags":[57,204],"stellar-product-taxonomy":[161],"class_list":["post-1952348","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-support-resources","tag-performance","tag-seo","stellar-product-taxonomy-the-events-calendar"],"acf":[],"taxonomy_info":{"category":[{"value":40,"label":"Get Help"}],"post_tag":[{"value":57,"label":"Performance"},{"value":204,"label":"SEO"}],"stellar-product-taxonomy":[{"value":161,"label":"The Events Calendar"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Guga Alves","author_link":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/author\/gugatheeventscalendar-com\/"},"comment_info":0,"category_info":[{"term_id":40,"name":"Get Help","slug":"support-resources","term_group":0,"term_taxonomy_id":40,"taxonomy":"category","description":"","parent":0,"count":28,"filter":"raw","term_order":"0","cat_ID":40,"category_count":28,"category_description":"","cat_name":"Get Help","category_nicename":"support-resources","category_parent":0}],"tag_info":[{"term_id":57,"name":"Performance","slug":"performance","term_group":0,"term_taxonomy_id":57,"taxonomy":"post_tag","description":"Learn all about how you can optimize your calendar's performance with The Events Calendar with these Knowledgebase articles.","parent":0,"count":25,"filter":"raw","term_order":"0"},{"term_id":204,"name":"SEO","slug":"seo","term_group":0,"term_taxonomy_id":204,"taxonomy":"post_tag","description":"","parent":0,"count":11,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1952348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1952348"}],"version-history":[{"count":6,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1952348\/revisions"}],"predecessor-version":[{"id":1962368,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1952348\/revisions\/1962368"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1952348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1952348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1952348"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1952348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}