CMS Made Simple Forums
https://forum.cmsmadesimple.org/

URLs view – causes to pages duplicates. Urgent!!!
https://forum.cmsmadesimple.org/viewtopic.php?f=20&t=77934
Page 1 of 1

Author:  vasilits [ Sat Feb 10, 2018 9:07 am ]
Post subject:  URLs view – causes to pages duplicates. Urgent!!!

Hello everyone,
I need any help with my URLs issues.

This is my typical URL for a product page:
https://www.mysite.de/group1/ group2/product1
However, if I change this URL to the next varieties the product page normally opens keeping changed URL:
https://www.mysite.de/product
https://www.mysite.de/group1/product1
https://www.mysite.de/group2/product1
https://www.mysite.de/type-any-text-here/product1
- here I just put any text inside the URL

Another example of such issue I found at this site:
https://docs.cmsmadesimple.org/tags/cmsms-tags/admin_icon
Try to change this URL e.g.:
https://docs.cmsmadesimple.org/admin_icon
https://docs.cmsmadesimple.org/sdfjsdfjsdvhs,jdfnkjsdfkjlsdfjljlksdflkj/admin_icon
As you see this is the same page.

Therefore, any product page might have several URLs. It caused to the problems in Search Console Tools and Google Analytics. Google finds page duplicates, states about page titles and descriptions duplicates, etc.
I configured pretty URLs like here:
https://www.cmscanbesimple.org/blog/setting-up-pretty-url-in-cmsms

I think this might be a common problem, but I cannot deal with this. Maybe there is any solution via .htaccess. Any piece of advice might be helpful for me.
Thanks in advance.

Author:  Rolf [ Sat Feb 10, 2018 11:29 am ]
Post subject:  Re: URLs view – causes to pages duplicates. Urgent!!!  Topic is solved

Just set the canonical url meta tag in your head area and module detail templates.
Search engines will only store/use this correct url!

The method is described here:
https://www.cmscanbesimple.org/blog/bas ... d-metatags

Author:  vasilits [ Sun Feb 11, 2018 1:59 pm ]
Post subject:  Re: URLs view – causes to pages duplicates. Urgent!!!

Thank you, Rolf.

I have already had this canonical tag on my pages. I use the Meta Max module that generates it. However, I noticed next thing.
E.g., this must be canonical url of my product page:
https://www.mysite.de/group1/ group2/product1
I change the url to:
https://www.mysite.de/type-any-text-here/product1
Then, I go to look at page’s code and find:
<link rel="canonical" href=" https://www.mysite.de/type-any-text-here/product1" />
So, the canonical meta teg also has changed.

This is Meta Max code for the canonical meta tag:
\$1:
{if $canonical != ''}
<link rel="canonical" href="{$canonical_url}" />
{else}
<link rel="canonical" href="{root_url}{if isset($smarty.get.page)}/{$smarty.get.page}{/if}" />
{/if}


I edited page templates as you (Rolf) mentioned above and changed Meta Mag module’s template to:
\$1:
{if $doctype_title != '0'}
<link rel="canonical" href="{$canonical_url}" />
{/if}

and everything works fine. Now, I have stable canonical meta tags for product pages.
Thank you very much.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/