Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2020-07-02 05:28:32

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,313
Website

Re: Duplicate content

colak wrote #324180:

Where should this be added? Also, is there a way to return a 404 rather than a 503?

I put in the head of the default page


Wondrous Healing Wondrous ways to a healthy old age
Safe Reiki Harmless natural healing.
Gud One Blog

Offline

#12 2020-07-02 10:32:39

etc
Developer
Registered: 2010-11-11
Posts: 3,768
Website

Re: Duplicate content

zero wrote #324179:

It’s a shame that you guys use Paypal to receive donations, (with its recaptcha)

Shame on you to worry about SEO :-)

BTW, your site also has duplicate /category/, /author/ content.

My site uses some extra URL parameters in code examples, so forbidding non-canonical links would not work. And then I don’t care.

colak wrote #324180:

Where should this be added? Also, is there a way to return a 404 rather than a 503?

Try <txp:txp_die status="404" />?

Offline

#13 2020-07-02 13:16:56

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,159
Website

Re: Duplicate content

etc wrote #324189:

Try <txp:txp_die status="404" />?

As you said, try “at your own risk.” It unfortunately does not work as expected desired on deeper url schemas (section/categories/article) and returns a 404 when landing on /section/cat1/cat2/ pages.

Last edited by colak (2020-07-02 13:18:11)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#14 2020-07-02 13:21:27

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,076

Re: Duplicate content

I will admit to being a bit baffled by this – no antagonistic intentions, just trying to understand.

If you want search engines to have non-duplicate content, totally understandable – that’s what canonical is for. I’m a bit fuzzy where the 503 / 404 errors are useful – does this mean anyone with a link to a page on your site that’s considered duplicate content get an error instead of the page content, or is intended as a search engine housekeeping exercise so any dupes will get rinsed out on the next run?

Last edited by gaekwad (2020-07-02 13:22:56)

Offline

#15 2020-07-02 14:40:47

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,159
Website

Re: Duplicate content

gaekwad wrote #324199:

I will admit to being a bit baffled by this – no antagonistic intentions, just trying to understand.

If you want search engines to have non-duplicate content, totally understandable – that’s what canonical is for. I’m a bit fuzzy where the 503 / 404 errors are useful – does this mean anyone with a link to a page on your site that’s considered duplicate content get an error instead of the page content, or is intended as a search engine housekeeping exercise so any dupes will get rinsed out on the next run?

Hi Pete,

there is an issue with the way txp understands the desired canonical url.

For example when using

<link rel="canonical" href="<txp:site_url trim="/" /><txp:page_url />" />

in the head of the document, it will parse the tags whatever the url is which renders it semantically wrong. So, what would the recommendation be in order to have the desired url in there? Also, the breadcrumbs tag, returns urls that are again not the desired ones.

I agree with many people in this community regarding the issues plaguing the search engines but at the same time, we all desire traffic from beyond those we have sent an email or gave our card to. As such we are engaged in a Hegelian master–slave dialectic that we cannot escape from. ie. There is no master unless recognised by the slaves.

In my view, maybe because I vividly remember and believe in the 90s web, search engines are the most appropriate places to have our work discovered. The idea should not be to destroy Google but to apply pressure in order to get it fixed.

As such, and having personally accepted that my relationship with Google and other search engines is a relationship of connivance, I am trying, like many others, to play ball and serve our content in a way which would increase our visibility (not our SEO).


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#16 2020-07-02 14:48:09

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,076

Re: Duplicate content

Thanks very much, Yiannis – now I understand what you mean. It took me a few reads to fully grok it (and that’s my brain, not your words), but that explains the situation.

Offline

#17 2020-07-02 14:51:52

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,313
Website

Re: Duplicate content

gaekwad wrote #324199:

I will admit to being a bit baffled by this – no antagonistic intentions, just trying to understand.

If you want search engines to have non-duplicate content, totally understandable – that’s what canonical is for. I’m a bit fuzzy where the 503 / 404 errors are useful – does this mean anyone with a link to a page on your site that’s considered duplicate content get an error instead of the page content, or is intended as a search engine housekeeping exercise so any dupes will get rinsed out on the next run?

I’m always a bit fuzzy with coding, sorry. When I wrote earlier ?=* I meant also ?c=* and ?whatever so sorry to have caused you to be more verbose, but thanks because I learned something from it.

Re 503 / 404, both your reasons above are good ones, imho.

Re canonical to sort out duplicate content, yes fine, that’s what it’s for, but also this is an extra precaution and I think it’s cleaner to try and get rid of all duplicate content in the first place. G are always changing their algorithms and who know what hoops they’ll want us to jump through in the future?

Sorry the evaluate code doesn’t work for you, Yiannis, I’m using it on a simple site with just /title URL pattern. I have it in the head of both default and archive pages and it’s perfect for my needs.


Wondrous Healing Wondrous ways to a healthy old age
Safe Reiki Harmless natural healing.
Gud One Blog

Offline

#18 2020-07-02 15:22:47

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,076

Re: Duplicate content

zero wrote #324202:

When I wrote earlier ?=* I meant also ?c=* and ?whatever so sorry to have caused you to be more verbose, but thanks because I learned something from it.

Ah! Got it. Thanks for clarifying. Certainly no need to apologise, either.

Offline

#19 2020-07-03 06:06:43

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,159
Website

Re: Duplicate content

Maybe I should bump this thread.

when using

<link rel="canonical" href="<txp:site_url trim="/" /><txp:page_url />" />

in the head of the document, it will understandably parse the tags whatever the url is which renders it semantically wrong.

ie. It will render


http(s)://domain.tld/section-name/ <--correct
http(s)://domain.tld/?s=section-name
http(s)://domain.tld/section-name/category1-name/  <--correct
http(s)://domain.tld/section-name/category1-name/category2-name/ <--correct
http(s)://domain.tld/?c=category1-name
http(s)://domain.tld/?c=category2-name
etc

So, what would the recommendation be in order to have the desired canonical url in there?


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#20 2020-07-03 06:17:19

etc
Developer
Registered: 2010-11-11
Posts: 3,768
Website

Re: Duplicate content

colak wrote #324221:

So, what would the recommendation be in order to have the desired canonical url in there?

Have you tried <link rel="canonical" href="<txp:page_url context />" />?

Offline

Board footer

Powered by FluxBB