How to fix duplicate page content canonical url

Discuss Search Engine Optimization in relation to Joomla!. This forum will also have discussions on SEF/SEO Joomla! extensions.

Moderator: General Support Moderators

Jesslynalvin
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Jun 01, 2014 5:56 pm

How to fix duplicate page content canonical url

Postby Jesslynalvin » Sun Jun 01, 2014 6:41 pm

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:
http://www.myknitt.com/vmchk/Dog-Clothe ... l?flypage=
http://www.myknitt.com/vmchk/Dog-Clothe ... 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,
jesslynalvin
www.myknitt.com

User avatar
NathanHawks
Joomla! Ace
Joomla! Ace
Posts: 1900
Joined: Wed Oct 02, 2013 6:17 pm
Location: Washington state, U.S.
Contact:

Re: How to fix duplicate page content canonical url

Postby NathanHawks » Thu Jun 05, 2014 8:31 pm

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} ^myknitt.com [NC]
RewriteRule ^(.*)$ http://www.myknitt.com/$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.
Save time - hire me for your Joomla to-do list! http://nathanhawks.us/joomla

vborn
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Aug 20, 2012 11:52 pm

Re: How to fix duplicate page content canonical url

Postby vborn » Wed Jan 28, 2015 2:28 am

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') {
      unset($doc->_links[$l]);
   }
}

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):
http://www.concept-br.de/blog/canonical-tag-for-joomla/

webzestyuk
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Jan 28, 2015 9:04 am
Location: Manchester, UK
Contact:

Re: How to fix duplicate page content canonical url

Postby webzestyuk » Wed Jan 28, 2015 9:11 am

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.

User avatar
NathanHawks
Joomla! Ace
Joomla! Ace
Posts: 1900
Joined: Wed Oct 02, 2013 6:17 pm
Location: Washington state, U.S.
Contact:

Re: How to fix duplicate page content canonical url

Postby NathanHawks » Thu Jan 29, 2015 4:13 pm

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.
Save time - hire me for your Joomla to-do list! http://nathanhawks.us/joomla


Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 2 guests