0

We are encountering an issue where some/most of our blog pages are not indexing with Google. Some random blog pages are indexed but most are not.

The pages are being rendered correctly by the google bot but are not being indexed.

This is our _entry.html that pulls in the craft blog and renders the individual blog view:

{% set title = entry.title ~ " | Blog" %}

{% if entry.metaDescription | length > 0 %}
    {% set description = entry.metaDescription  %}
{%else%}
    {% set description = entry.body|split('</p>') [0] | striptags | slice(0, 144)  %}
{%endif%}

{% block meta_tags %}
    {{ siteMacros.returnMetaTags({
            'description' : description,
            'og:title' : entry.title ~ ' | Default Titlge Here',
            'og:image' : siteUrl ~ 'assets/favicons/favicon-196x196.png'
        }) 
    }}
{% endblock %}

{% block content %}

    <h1 class="main-page-title">{{entry.title}}</h1>

    <div class="entry-container">
        <article>
            {% include 'content_blocks/_entryBody.html' %}
        </article>

        <aside>
            {% include 'content_blocks/_blogCategoryList.html' %}
        </aside>
    </div>

{% endblock %}

This just filters everything through the _entrybody.html which looks like this:

{% import '_macros' as siteMacros %}

{%if entry.subHead | length %}
    <h2>{{entry.subHead}}</h2>
{%endif%}
    {% if entry.image | length %}
        {% set image = entry.image.first() %}
    {% elseif entry.curataImage | length %}
        {% set image = entry.curataImage %}
    {%endif%}

    {% if image | length %}
        {{ siteMacros.responsiveImage(image) }}
    {%endif%}

    {%if entry.video | length %}
    <iframe src="{{ craft.videoEmbed.getEmbedUrl(entry.video) }}"></iframe>
    {%endif%}

    <div class="content-body">
        {% set paragraphs = entry.body|split('</p>') %}
        {% set pfirstBreak = (paragraphs | length / 2 ) | round - 1 %}
        {% set firstParagraphs = paragraphs | slice (0, pfirstBreak) %}
        {% set lastParagraphs = paragraphs | slice (pfirstBreak, paragraphs | length ) %}

        {% for p in firstParagraphs %}
            {{p|raw}}
        {%endfor%}

        {%if entry.pullQuote | length %}
            <blockquote>
                {{entry.pullQuote}}
            </blockquote>
        {%endif%}

        {% for p in lastParagraphs %}
            {{p|raw}}
        {%endfor%}

        {% if entry.pdf | length %}
            <div class="documents">
                <span><small>Related Documents:</small></span>
                {%for pdf in entry.pdf %}
                    <p><a href="{{pdf.url}}">{{pdf.title}} [pdf]</a></p>
                {%endfor%}
            </div>
        {%endif%}


        {% if entry.referringSite | length  and  entry.readMoreLink | length %}
            <p>Read the full article at <a target="_blank" href="{{entry.readMoreLink}}">{{entry.referringSite}}</a></p>
        {% endif %}

    </div>

    {% if not hidePostDate %}
        {% set category = entry.category.first %}
        <p><strong>Posted {{ entry.postDate.format('F j, Y') }}{% if category | length %} in {{category.link}}{%endif%}.</strong></p>
    {% endif %}

I'm unsure why any of this would cause the pages not to be indexed by google. Some pages are indexed that go through this same code but others are not.

1

Just because Google has not indexed your pages doesn't mean there isn't necessarily anything wrong. Have you gone into the group Google search console to see what pages it has actually consumed?

Also, you might consider trying SEOmatic to handle your SEO: https://github.com/nystudio107/seomatic

  • We can see that it has crawled all of the pages, but is only indexing random blogs. Which ones are indexed seems to change every day/few days as well. – Exziled Feb 8 '17 at 16:45
1

Well, this isn't a Craft issue.

You can submit a URL to be indexed via the "render" tab in Google Search Console. IIRC not all will necessarily be indexed straight away, even if submitted by itself, it may take time.

You might find more info on this on the Webmasters Forum: https://productforums.google.com/forum/#!forum/webmasters

  • The URLs have been submitted and some are indexing, and then it will not be indexed the next day. A few days later it'll be indexed again. – Exziled Feb 8 '17 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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