<p>Check out the guide for <a href="https://docs.solspace.com/craft/calendar/v4/introduction/#preventing-endless-search-engine-crawling" rel="nofollow noreferrer">preventing endless search engine crawling</a>.</p>
<blockquote>
<p>When using some of Calendar's template queries to generate month calendar views, a mini calendar, etc, these will inadvertently create neverending links to dynamically generated URL's to account for endless date possibilities. What can then happen is that search engine crawlers can get stuck on this endlessly. To work around this, you can use some simple Twig conditional checks to wrap around <strong>Previous</strong> and <strong>Next</strong> month/week/day links to prevent them from showing after a certain number of days.</p>
</blockquote>
<pre class="lang-html prettyprint-override"><code>&lt;div id=&quot;month_calendar&quot;&gt;
    {% set month = craft.calendar.month({
        date: targetDate,
        calendar: calendarHandle,
    }) %}

    {% set dateBoundsHelper = now.diff(month.nextDate)|date('%r%a') %}

    &lt;div class=&quot;row justify-content-between mb-3&quot;&gt;
        &lt;div class=&quot;col-3&quot;&gt;
        {% if dateBoundsHelper &gt; -365 %}
            &lt;a class=&quot;btn btn-outline-secondary&quot;
                href=&quot;{{ siteUrl }}calendar-demo/month/{{ segment3 == &quot;calendar&quot; ? &quot;calendar/&quot;~segment4~&quot;/&quot; }}{{ month.previousDate.format('Y/m') }}&quot;&gt;
                &lt;span class=&quot;fas fa-arrow-left&quot;&gt;&lt;/span&gt; {{ month.previousDate.format('F') }}
            &lt;/a&gt;
        {% endif %}
        &lt;/div&gt;

        &lt;div class=&quot;col-auto&quot;&gt;
            &lt;h3&gt;
                {{ date.format('F Y') }} &amp;nbsp;
                &lt;span class=&quot;badge {{ month.eventCount ? &quot;badge-warning&quot; : &quot;badge-secondary&quot; }}&quot;&gt;
                    {{ month.eventCount }} event{{ month.eventCount &gt; 1 or month.eventCount == 0 ? &quot;s&quot; }}
                &lt;/span&gt;
            &lt;/h3&gt;
        &lt;/div&gt;

        &lt;div class=&quot;col-3 clearfix&quot;&gt;
        {% if dateBoundsHelper &lt; 365 %}
            &lt;a class=&quot;btn btn-outline-secondary float-right&quot;
                href=&quot;{{ siteUrl }}calendar-demo/month/{{ segment3 == &quot;calendar&quot; ? &quot;calendar/&quot;~segment4~&quot;/&quot; }}{{ month.nextDate.format('Y/m') }}&quot;&gt;
                {{ month.nextDate.format('F') }} &lt;span class=&quot;fas fa-arrow-right&quot;&gt;&lt;/span&gt;
            &lt;/a&gt;
        {% endif %}
        &lt;/div&gt;
    &lt;/div&gt;
    ...
</code></pre>

CC BY-SA 4.0
2023-10-14T21:46:20.787Z
2023-10-14T21:46:20.787Z
Solspace
<p>Use the corresponding meta tag in the pages you do not want to be indexed.</p>
<p><a href="https://developers.google.com/search/docs/crawling-indexing/block-indexing#:%7E:text=noindex%20is%20a%20rule%20set,noindex%20rule%2C%20such%20as%20Google" rel="nofollow noreferrer">https://developers.google.com/search/docs/crawling-indexing/block-indexing#:~:text=noindex%20is%20a%20rule%20set,noindex%20rule%2C%20such%20as%20Google</a>.</p>

CC BY-SA 4.0
2023-10-14T10:39:25.097Z
2023-10-14T10:39:25.097Z
Matthias Redl-Mann
<p>I have an additional hundred thousand pages being crawled by google and I do not want them to be crawled by any search engines.</p>
<p>Example: <a href="https://www.ucbcanada.com/events/month/2664/04" rel="nofollow noreferrer">https://www.ucbcanada.com/events/month/2664/04</a></p>
<p>I have week views showing up. I have Day views and then even go way too far into the future, like year 2664?. Am I doing something wrong in the plugin settings that are causing this?
<a href="https://i.sstatic.net/a38a1.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/a38a1.png" alt="enter image description here" /></a>
Thanks from Canada!</p>
<p>d</p>

<plugin-solspacecalendar>
How to stop all the solspace calendar views from being crawled by search engines
# How to stop all the solspace calendar views from being crawled by search engines

(Asked by: username_0 on 2023-10-13)

I have an additional hundred thousand pages being crawled by google and I do not want them to be crawled by any search engines.

Example: <https://www.ucbcanada.com/events/month/2664/04>

I have week views showing up. I have Day views and then even go way too far into the future, like year 2664?. Am I doing something wrong in the plugin settings that are causing this?
[![enter image description here](https://i.sstatic.net/a38a1.png)](https://i.sstatic.net/a38a1.png)
Thanks from Canada!

d

**Tags:** plugin-solspacecalendar

---

## 2 answers

### Answer by username_1 on 2023-10-14. Score: 2

Check out the guide for preventing endless search engine crawling.

When using some of Calendar's template queries to generate month calendar views, a mini calendar, etc, these will inadvertently create neverending links to dynamically generated URL's to account for endless date possibilities. What can then happen is that search engine crawlers can get stuck on this endlessly. To work around this, you can use some simple Twig conditional checks to wrap around Previous and Next month/week/day links to prevent them from showing after a certain number of days.


    {% set month = craft.calendar.month({
        date: targetDate,
        calendar: calendarHandle,
    }) %}

    {% set dateBoundsHelper = now.diff(month.nextDate)|date('%r%a') %}

    
        
        {% if dateBoundsHelper > -365 %}
            
                 {{ month.previousDate.format('F') }}
            
        {% endif %}
        

        
            
                {{ date.format('F Y') }}  
                
                    {{ month.eventCount }} event{{ month.eventCount > 1 or month.eventCount == 0 ? "s" }}
                
            
        

        
        {% if dateBoundsHelper < 365 %}
            
                {{ month.nextDate.format('F') }} 
            
        {% endif %}
        
    
    ...


---

### Answer by username_2 on 2023-10-14. Score: 1

Use the corresponding meta tag in the pages you do not want to be indexed.

[https://developers.google.com/search/docs/crawling-indexing/block-indexing#:~:text=noindex%20is%20a%20rule%20set,noindex%20rule%2C%20such%20as%20Google](https://developers.google.com/search/docs/crawling-indexing/block-indexing#:%7E:text=noindex%20is%20a%20rule%20set,noindex%20rule%2C%20such%20as%20Google).


---

