1

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 Thanks from Canada!

d

2 Answers 2

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.

<div id="month_calendar">
    {% set month = craft.calendar.month({
        date: targetDate,
        calendar: calendarHandle,
    }) %}

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

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

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

        <div class="col-3 clearfix">
        {% if dateBoundsHelper < 365 %}
            <a class="btn btn-outline-secondary float-right"
                href="{{ siteUrl }}calendar-demo/month/{{ segment3 == "calendar" ? "calendar/"~segment4~"/" }}{{ month.nextDate.format('Y/m') }}">
                {{ month.nextDate.format('F') }} <span class="fas fa-arrow-right"></span>
            </a>
        {% endif %}
        </div>
    </div>
    ...
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.