suitsyou
Advanced Member
USA
487 Posts Pre-sales questions only (More Details...)
|
Posted - 10/12/2017 : 10:07:38
Hello, We've added rel="canonical" links to our pages, but get an error when we add it to the "proddetail.php" page. This is what we added <link rel="canonical" href="https://suitsyouswimwear.com/proddetail.php" /> Do we have to add anything else to the link? The reason we are doing this is to get rid of the "duplicate page" errors with http and https.
It's working fine on all other pages (example page https://suitsyouswimwear.com/competition-bikinis.php).
Thanks, Clyde http://www.SuitsYouSwimwear.com
|
Sinbad
ECT Moderator
USA
65937 Posts |
Posted - 10/12/2017 : 11:01:26
|
suitsyou
Advanced Member
USA
487 Posts Pre-sales questions only (More Details...)
|
Posted - 10/12/2017 : 13:40:59
Thank you Simbad, It worked great on SuitsYouSwimwaer.com but not on SuitsYouSexy.com, I assume it's something to do with the setting on the second site, I'll keep working on it. Thank you for the quick reply, much appreciated.
Thanks, Clyde http://www.SuitsYouSwimwear.com
|
suitsyou
Advanced Member
USA
487 Posts Pre-sales questions only (More Details...)
|
Posted - 10/13/2017 : 11:23:51
I can't seem to get it working on our other site, example https://www.suitsyousexy.com/proddetail.php?prod=bow-bottom-bikini The settings are the same and both sites are on the same server, any suggestions? Currently we removed the code because it caused more errors (broken links).
Thanks, Clyde http://www.SuitsYouSwimwear.com
|
Sinbad
ECT Moderator
USA
65937 Posts |
Posted - 10/13/2017 : 11:35:26
|
suitsyou
Advanced Member
USA
487 Posts Pre-sales questions only (More Details...)
|
Posted - 10/17/2017 : 16:02:56
Hi Sinbad, What do you mean by setting the base url above the code? We're adding the following code to the proddetail.php page: <link rel="canonical" href="https://www.suitsyousexy.com/proddetail.php">
Thanks, Clyde http://www.SuitsYouSwimwear.com
Edited by - suitsyou on 10/19/2017 07:38:43
|
suitsyou
Advanced Member
USA
487 Posts Pre-sales questions only (More Details...)
|
Posted - 10/20/2017 : 07:18:27
Hi Sinbad, can you explain your last reply?
Thanks, Clyde http://www.SuitsYouSwimwear.com
Edited by - suitsyou on 12/06/2017 14:33:56
|
Sinbad
ECT Moderator
USA
65937 Posts |
Posted - 12/06/2017 : 14:47:14
|
ITZAP
Ecommerce Template Guru
Australia
1018 Posts |
Posted - 12/06/2017 : 21:00:49
If you go back and read this post again ... https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=104554Notice that you need to Copy / Paste that php function getCurrentUrl code snippet into the <head> section of your proddetail.php page. Then these 2 lines will print the correct canonical page URL ... <link rel="canonical" href="<?php print getCurrentUrl(true); ?>" /> <meta property="og:url" content="<?php print getCurrentUrl(true); ?>" />And please note of this critical sentence ... quote: For those who do use the Search Engine Friendly URL's, then the CANONICAL URL entries (last 2 lines) need to be changed from true to false
Gary
Edited by - ITZAP on 12/06/2017 21:33:11
|
suitsyou
Advanced Member
USA
487 Posts Pre-sales questions only (More Details...)
|
Posted - 04/03/2018 : 19:13:59
We're still having problems with this, we've tried moving it up to the head section. Tried it with "TRUE" and "FALSE" too. https://suitsyouswimwear.com/proddetail.php?prod=pro-bikini-velvet-g Right now, we have it totally removed. Any suggestions? PLEASE
Thanks, Clyde http://www.SuitsYouSwimwear.com
|
dbdave
ECT Moderator
USA
10448 Posts |
Posted - 04/03/2018 : 19:43:14
If I were having this problem, quote: The reason we are doing this is to get rid of the "duplicate page" errors with http and https.
I would set a redirect in my htaccess file to always force the visitor to https and then it would be impossible for a search engine to index an http version of your pages and the error would go away.
|
ITZAP
Ecommerce Template Guru
Australia
1018 Posts |
Posted - 04/03/2018 : 21:12:25
Hello Clyde, Looking at the source code of your "Pro Bikini" page, you do not have dynamic <canonical> or meta og:tag code happening there at all. If you go to: https://itzap.com.au/ecommerce-templates-dynamic-title-meta-description-code.phpDownload my free WinZip file there (which includes a ReadMe.pdf) that provides all the answers you are looking for regarding Ecommerce Templates Dynamic PHP Page title, meta description and meta og:tag code. Gary
|
|
|