Jump to content
sarfaraz.r1406

Duplicate Meta description in webmaster even when canonical 301 redirects is activated in Prestashop

Recommended Posts

Hi,

 

We are getting duplicate meta description in webmaster tools for dynamically fetched pages.

Lets say we have 48 products in one category.

 

Category URL:

www.example.com/6/vegetables

 

In the first version of the page we allow 24 products. Remaining products are showcased in the next page with below(where page-2 is dynamically generated) URL

www.example.com/6/vegetables/#/page-2

 

Problem Statement:

 

Now, google bots are considering these two pages as different pages. But these two pages are all together same page according to us. Overall 301 redirect for canonicalization is already implemented for this scenario in overall application.

 

Expected Solution:

 

1. How to remove this error in webmaster?

 

Concerns:

 

1. Does this error will hamper the SEO of my application?

 

 

Thanks in advance :)

post-777241-0-51277200-1442045870_thumb.png

Edited by sarfaraz.r1406 (see edit history)

Share this post


Link to post
Share on other sites

I generally tell my clients to no follow their category paginated pages and point the canonical back to the main category page. 

Share this post


Link to post
Share on other sites

I solved the problem somehow by adding the following lines in my header.tpl file.

{if $page_name == category}
   <link rel="canonical" href="{$base_dir}{$request_uri|substr:1}" />
{/if}
 
This solved my problem as when browsing my url is something like this:
 
But in webmasters tools, google says it found duplicate meta description for the following pages:
 
But for this link the canonical url doesn't work. My query is why google crawls this url when it can never be obtained by simple browsing?

Share this post


Link to post
Share on other sites

this 2nd link could be from some realy old crawling (before you've changed urls) perhaps and u shouldn't worry about it

Share this post


Link to post
Share on other sites
<meta charset="utf-8" />
<title>{if $p != 1 and $page_name == 'category'}({$p})- {l s='Страница'} {/if}{if $p != 1 and $page_name == 'new-products'}({$p})- {l s='Страница'} {/if}{if $p != 1 and $page_name == 'prices-drop'}({$p})- {l s='Страница'} {/if}{if $page_name == 'product'}{l s='Купить'} {$product->name|escape:'html':'UTF-8'} - Название магазина ✓ {$product->reference|escape:'html':'UTF-8'}{else}{$meta_title|escape:'html':'UTF-8'}{/if}</title>
<meta name="description" content="{if $p != 1 and $page_name == 'category'}({$p})- {l s='Страница'} {/if}{if $page_name == 'product'}{l s='Купить'} {$product->name|escape:'html':'UTF-8'}{l s=' ➨ в магазине Название магазина ✓'} {else} {$meta_description|escape:'html':'UTF-8'}{/if}" />

 :) 

God bless the author of this code))

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More