Forums / Setup & design / How to avoid duplicate content for search engines

How to avoid duplicate content for search engines

Author Message

Michael Fürst

Tuesday 09 June 2009 1:39:50 am

Hi there,

I have some questions on search engine optimization. I did everything to avoid duplicate content on our site (e.g. 302 redirect from domain.com/article to www.domain.com/article) and everything works fine.

BUT:
As you know, articles can be found within their "original view URL" and with their "nice URL". For example the same article can be found at:

<b>http://www.domain.com/content/view/full/960</b>
and
<b>http://www.domain.com/Folder/Content/200906/Title-of-Article</b>

I only use nice-URL in my links on the site, but for any reason google fetches the "original URL" in its index. And so we have a beautiful example for duplicate content....

So has anyone an idea, how to avoid this? The best solution would be a 302 redirect, if the original url is called - but i've no idea how to do ...

Thanks in advance,
Cheers,
Mike

Gaetano Giunta

Tuesday 09 June 2009 8:56:33 am

One way is to add a check at the top of the pagelayout.tpl that checks if the url in use is content/view/full/* and if it is, redirect instead to the node virtual url.

You will need a simple template operator that sends custom http headers for that.

Might be dangerous if you get stuck in loops, though.

Principal Consultant International Business
Member of the Community Project Board

Radek Kuchta

Tuesday 09 June 2009 12:18:56 pm

If you worry about duplicate content use <link> tag to specify your preferred version of page (URL address).

http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html

http://ez.no/certification/verify/272582

Damien Pobel

Wednesday 10 June 2009 2:42:40 am

Hi,

Another solution is to write a "content read" workflow event that checks the URL and redirects if necessary. It's quite close to Gaetano's solution but I find dirty to implement such a logic in a template operator.

Cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Michael Fürst

Wednesday 10 June 2009 4:38:40 am

Hi guys,

Thanks for your response.
I think the easiest way would be to define the <link> Tag.

But I'm really interested in the workflow solution. I read the documentation, but it is really short. Do you have a link to a manual or some tutorials about how to write and implement an own workflow event?

Thanks & regards,
Michael

Damien Pobel

Wednesday 10 June 2009 6:15:48 am

Hi Mike,

you can start with eZpedia article [1] or look at an existing workflow event type [2].

For a "content read", you also have to enable the content_read operation, see settings/workflow.ini.

[1] http://ezpedia.org/ez/workflow_event_type
[2] http://projects.ez.no/types/ez_publish/workflow_event_type/

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Michael84 Michael84

Thursday 18 June 2009 1:25:42 am

People, I'd recommend using this duplicate file finder - http://www.moleskinsoft.com/duplicate-file-finder-1
It can deal with unnecessary files on your hard drive. It has many functions, user-friendly interface, safety options and 100% efficiency.

eZ debug

Timing: Jan 18 2025 11:18:50
Script start
Timing: Jan 18 2025 11:18:50
Module start 'content'
Timing: Jan 18 2025 11:18:51
Module end 'content'
Timing: Jan 18 2025 11:18:52
Script end

Main resources:

Total runtime1.5674 sec
Peak memory usage4,096.0000 KB
Database Queries212

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 588.9922180.8125
Module start 'content' 0.00581.4095 769.8047719.2422
Module end 'content' 1.41530.1521 1,489.0469340.4297
Script end 1.5674  1,829.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.2584210.0002
Check MTime0.00150.0977210.0001
Mysql Total
Database connection0.00070.045310.0007
Mysqli_queries1.469193.72502120.0069
Looping result0.00250.15942100.0000
Template Total1.537198.120.7686
Template load0.00190.122720.0010
Template processing1.535297.943420.7676
Template load and register function0.00010.006410.0001
states
state_id_array0.00100.063810.0010
state_identifier_array0.00140.091620.0007
Override
Cache load0.00170.1066480.0000
Sytem overhead
Fetch class attribute can translate value0.00220.139860.0004
Fetch class attribute name0.00170.1079110.0002
XML
Image XML parsing0.00220.139160.0004
class_abstraction
Instantiating content class attribute0.00000.0032130.0000
General
dbfile0.00290.1835450.0001
String conversion0.00000.000330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 35
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs