Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi

Checking a project that's live for a month now on Google indexation and discovered that after my website also a page for "Next page" and "Previous page" is created. Ofcourse this doesn't make a lot of sense and isn't quite looking professional. 8-)

I used on my index.php the following code:
Code: Select all
<cms:if k_paginated_bottom >
                <cms:if k_paginate_link_prev >
                    <a class="pagination" href="<cms:show k_paginate_link_prev />"><span class="glyphicon glyphicon-circle-arrow-left"></span> VORIGE PAGINA</a>
                </cms:if>
                <cms:if k_paginate_link_next >
                    <a class="pagination" href="<cms:show k_paginate_link_next />">VOLGENDE PAGINA <span class="glyphicon glyphicon-circle-arrow-right"></span></a>
                </cms:if>
            </cms:if>


That is working fine.
I see when you click on next or previous, the site is linking to /?pg=2.
I assume this is the reason that google sees this as a new indexable page.

Is there any way of changing the format of this url structure?
Or to prevent Google to index it?

Thanks!
Sam,

As Google suggests, you can place the following in the <HEAD> of pages that you don't want to get indexed
<meta name="robots" content="noindex, follow">

Since you are using the pagination code, I think it is safe to assume that it is in a list-view i.e you are listing a series of single pages in it - this can cause content duplication so some people make the entire list-view non-indexable.

However, if you want to make only the pages that follow the first page non-indexable, you can use this to target pages with links like /?pg=2 -
Code: Select all
<cms:if "<cms:gpc 'pg' method='get' />" >
   <meta name="robots" content="noindex, follow">
</cms:if>

Hope this helps.
Thanks!
Added it to my index page.

Just to know: does this the same thing as if I would write a rule in the robots.txt file via webmaster tools?
the same thing as if I would write a rule in the robots.txt file via webmaster tools?
It would - in the sense that it would prevent a list page from being indexed. *But* it will also have a side-effect that, most likely, will be undesirable - since Google bot will not touch the list page at all, it will also not follow the links to the pages listed within it. See the point?

Therefore, I think, using the META is a better option.
4 posts Page 1 of 1