Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate content and PageRank loss #1668

Closed
nodecode opened this issue Jun 11, 2014 · 10 comments
Closed

Duplicate content and PageRank loss #1668

nodecode opened this issue Jun 11, 2014 · 10 comments

Comments

@nodecode
Copy link

It is not good for search engines to use when scrolling URLs like https://community.nodebb.org/topic/72/we-need-your-help/18. As soon as a user this URL copied, and they linked from a website, Google finds duplicate content. In addition, the PageRank goes to different URLs, and not to one single.
See also: https://support.google.com/webmasters/answer/66359?hl=en

There are two ways to resolve this problem:

@psychobunny
Copy link
Contributor

For your second solution, in that link there is a section under the canonical urls section that say that sitemaps would be another solution. NodeBB does ship with a built in sitemap (found at root/sitemap.xml) which looks something like this:

<url><loc>https://community.nodebb.org/topic/23/youtube-links</loc><lastmod>2013-08-09T08:33:35.285Z</lastmod><changefreq>daily</changefreq><priority>0.6</priority></url>

Adding rel="canonical" isn't a bad idea though, thanks for reporting

@svishi
Copy link

svishi commented Aug 13, 2017

@psychobunny somehow this still keeps happening. The latest source code doesn't have the rel=canonical tag on topics. Can this be fixed by adding another JSON block in src\controllers\topics.js at line 290 res.locals.linkTags like so:

	res.locals.linkTags = [
		{
			rel: 'alternate',
			type: 'application/rss+xml',
			href: topicData.rssFeedUrl,
		},
		{
			rel: 'canonical',
			href: nconf.get('url') + '/topic/' + topicData.slug,
		},
	];

@psychobunny
Copy link
Contributor

reopened, RFC

@julianlam
Copy link
Member

If we don't already have the link to the canonical topic URL, then we should definitely add one

@svishi
Copy link

svishi commented Sep 22, 2017

It's not there. Could we add it in the next release?

@barisusakli barisusakli self-assigned this Sep 22, 2017
@barisusakli barisusakli added this to the 1.6.1 milestone Sep 22, 2017
@BenLubar
Copy link
Contributor

BenLubar commented Oct 2, 2017

@barisusakli what about multi-page topics?

@barisusakli
Copy link
Member

I think this code was added to handle that.

@BenLubar
Copy link
Contributor

BenLubar commented Oct 5, 2017

I'm pretty sure Google honors rel="canonical" on pages even if they're linked to from a <link> tag. I would suggest setting the canonical URL to the current post rounded down to a multiple of the page size. That's why I currently have WTDWTF set to use pagination for logged-out users.

@barisusakli
Copy link
Member

So canonical url should be as follows when posts per page is 20?

http://forum.com/topic/1/title on page1
http://forum.com/topic/2/title/20 on page2
http://forum.com/topic/2/title/40 on page3 
...

@BenLubar
Copy link
Contributor

BenLubar commented Oct 7, 2017

Yeah, that would work, assuming the page ending in /20 includes posts 20-39 on load (without any scrolling to load content required)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants