Page URL = canonical link

https://www.phpbb.com/ideas/
Post Reply
Author:
Webliberty
Posted:
Sat Jan 25, 2020 2:47 pm
Rating:
Status:
New
Ticket:
PHPBB3-16138
User avatar
Webliberty
Registered User
Posts: 20
Joined: Thu Oct 30, 2014 12:49 pm
Contact:

Page URL = canonical link

Post by Webliberty »

The URL of the page in the search bar of the browser must match the canonical link. If the canonical link does not contain the parameter f, then the URL of the page must also be without f.

:oops: The URL of the page in the search bar of the browser:

Code: Select all

viewtopic.php?f=1&t=1
:!: The canonical link:

Code: Select all

viewtopic.php?t=1
Forum users copy the page addresses and share them, for example, on social networks or on other sites. Thus, all links do not lead to canonical pages, which is bad for SEO since search robots have to crawl 2 times more pages, creating a load on the server.

User avatar
Webliberty
Registered User
Posts: 20
Joined: Thu Oct 30, 2014 12:49 pm
Contact:

Re: Page URL = canonical link

Post by Webliberty »

Why not do it in phpBB 4.0?

User avatar
Webliberty
Registered User
Posts: 20
Joined: Thu Oct 30, 2014 12:49 pm
Contact:

Re: Page URL = canonical link

Post by Webliberty »

I just found information that removing the parameter f from the URL is already being considered and there is a corresponding ticket https://tracker.phpbb.com/browse/PHPBB3-16138

And also on GitHub: https://github.com/phpbb/phpbb/pull/5760

It is very cool! :)

User avatar
AmigoJack
Registered User
Posts: 5697
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Page URL = canonical link

Post by AmigoJack »

Webliberty wrote:
Sat Jan 25, 2020 2:47 pm
the search bar of the browser
Why isn't that the address bar to you?
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

User avatar
Webliberty
Registered User
Posts: 20
Joined: Thu Oct 30, 2014 12:49 pm
Contact:

Re: Page URL = canonical link

Post by Webliberty »

AmigoJack wrote:
Mon Jan 27, 2020 8:07 am
Why isn't that the address bar to you?
In modern browsers, the search bar and address bar are combined and essentially the same.

phponly
Registered User
Posts: 3
Joined: Wed Sep 25, 2019 11:00 pm

Re: Page URL = canonical link

Post by phponly »

So this means only the index of the topic will be indexed correct?

E: Thanks for helping me understand better guys.
Last edited by phponly on Tue Jan 28, 2020 4:45 pm, edited 1 time in total.
I provide a free mirror service for open-source projects, pm me. I'm also starting to create free html templates in my spare time.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51931
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Page URL = canonical link

Post by Brf »

As I understand it, the idea is to index each page of a topic only once. Each individual post should not be indexed, because a post's URL leads to its topic page, and would result in duplicate content for each post on the page.

The concern of this topic is that the canonical link does not contain the "f=" parameter, so does not match the URL of the page.

Peter77sx
Registered User
Posts: 3259
Joined: Wed Nov 09, 2005 2:51 pm

Re: Page URL = canonical link

Post by Peter77sx »

Webliberty wrote:
Sat Jan 25, 2020 2:47 pm
bad for SEO since search robots have to crawl 2 times more pages, creating a load on the server.
You're right. There is no point for bots to crawl the search.php other than use up resources. The search page does not contain content to be indexed, it has links to follow, but that's kind of kind of the point of RSS feeds, you are able to submit RSS feeds to get crawled, and letting bots crawl your forums instead.

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2517
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Page URL = canonical link

Post by kinerity »

viewforum.php

Code: Select all

'U_CANONICAL'   => generate_board_url() . '/' . append_sid("viewforum.$phpEx", "f=$forum_id" . (($start) ? "&start=$start" : ''), true, ''),
viewtopic.php

Code: Select all

'U_CANONICAL'   => generate_board_url() . '/' . append_sid("viewtopic.$phpEx", "t=$topic_id" . (($start) ? "&start=$start" : ''), true, ''),
It should be easy to just add the f parameter to viewtopic.
Kailey Truscott - Community Team

KYPREO
Registered User
Posts: 312
Joined: Fri Feb 02, 2018 9:56 am
Contact:

Re: Page URL = canonical link

Post by KYPREO »

Peter77sx wrote:
Fri Feb 07, 2020 10:38 pm
Webliberty wrote:
Sat Jan 25, 2020 2:47 pm
bad for SEO since search robots have to crawl 2 times more pages, creating a load on the server.
You're right. There is no point for bots to crawl the search.php other than use up resources. The search page does not contain content to be indexed, it has links to follow, but that's kind of kind of the point of RSS feeds, you are able to submit RSS feeds to get crawled, and letting bots crawl your forums instead.
You have misunderstood the OP. He is not talking about search.php at all. He is talking about the browser navigation bar. Bots cannot and do not conduct keyword searches using search.php to identify topics - they crawl organically by following index, breadcrumbs, internal links etc.

The OP is right in that the canonical link for topics is viewtopic.php?t=*. This is how Google wants to index topic pages. However, when you (or indeed crawlers) navigate a phpBB board natively, viewtopic also contains the f=* parameter. This causes bots to crawl multiple versions of the same page. This can be verified in Google Search Console. I have over 100,000 duplicate ignored pages marked as duplicate of canonical.

I don't know that this necessarily "bad for SEO" as Google is smart enough to recognise the f=* version as a duplicate of the canonical. However, every page is getting crawled twice as often as it needs to be by every bot, placing unnecessary load on the server.

The f=* parameter is redundant as topic identification does not require forum categorisarion in the URL.

In any event, this change will happen as it has already been marked for merger into phpBB v.3.3.1.
phpBB user since 2002
www.AusRotary.com

Post Reply

Return to “phpBB Ideas”