Page 1 of 1

How to fix duplicate page content canonical url

Posted: Sun Jun 01, 2014 6:41 pm
by Jesslynalvin
Hello Joomla User,.

I am a newbie for this seo things And I am about one month using SEOMOZ then got a report that there are more than 1000 duplicate page content urls
here is the example of my duplicate page content: ... l?flypage= ... html?pop=0

I heard that it can be fixed by SH404SEF by tweaking the code. I already used SH404SEF But I dunno how to tweak the code.
If anyone could give me a help to fix my problem, it would be very appreciated.
Thank you

Kind regards,

Re: How to fix duplicate page content canonical url

Posted: Thu Jun 05, 2014 8:31 pm
by NathanHawks
The simplest solution is to manually edit your .htaccess file. Find the line:

Code: Select all

RewriteEngine On
And add immediately after it:

Code: Select all

# Redirect non-www to www (recommended by NathanHawks at The Joomla Forum)
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [L,R=301]
This will tell both visitors' browsers, and search engines, that the non-www pages have been permanently moved to their www counterparts. The search engines will tidy themselves up the next time they crawl.

Re: How to fix duplicate page content canonical url

Posted: Wed Jan 28, 2015 2:28 am
by vborn
The question wasn't about non-www and www.
I don't see how the current canonicals ever made it into production!?
A first step is to remove Joomla's severely broken canonicals:

Code: Select all

foreach ($doc->_links as $l => $array) {
	if ($array['relation'] == 'canonical') {
A second step to add a propper one (says for 1.5 and 2.5, but I'm using a derivative of this for 3.x):

Re: How to fix duplicate page content canonical url

Posted: Wed Jan 28, 2015 9:11 am
by webzestyuk
Thats really easy you just have to add the Rel=canonical tag in the header of the Website. and the website will get open only from one link . It tells google that you are not duplicate content.

Re: How to fix duplicate page content canonical url

Posted: Thu Jan 29, 2015 4:13 pm
by NathanHawks
Ah, I see... another newfangled tag. I mainly launch sites or fix boo-boos, I don't run them.

When it comes to individual pages... I hope someday Joomla will have better URL control, but since it has always had terrible URL control, you can forget about an easy way from within Joomla's stock features, period.

I read the PHP script at the link you posted, @webzestyuk, and it looks safe enough, but it would only seem to handle com_content (articles and categories). @Jesslynalvin has a /vmchk/ folder in the URLs which I assume is VirtueMart. @Jesslynalvin, if that's true, you may have better luck with the VirtueMart community for help on controlling its URLs and inserting rel=canonical for its pages, specifically.

If/when that becomes a sad and frustrating joke, another option is to devise some way of using lower-level web server features - stuff that is probably built into your hosting account. For example, you could create a spreadsheet macro that turns a new product page URL, into a batch of .htaccess lines; that way, you could set canonical via Apache's mod_headers feature, instead of the HTML HEAD section. Your .htaccess file would grow long and would become a mission critical part of your website, but it runs faster. You would still need to disable Joomla's insertion of a canonical URL in the HTML.

I just noticed this is a J1.5 discussion... bowing out.