Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Url-Problem with different urls same id

0 votes
312 views
asked Jan 29, 2013 in Q2A Core by krafttrain
Both urls are valid, the have same id:

xxxxxxxxurl.com/?q=1/testblahblahbvlah

xxxxxxxxurl.com/?q=1/testblahblahbvlahblah

So if somebody links to url1 and url2 google thinks i have duplicate content, which is true.

A test has to be ncluded like this (Psyeudo code)

$question = loadQuestion($id);
$myDesiredUrl = formatDesiredUrl($question['title']);

if($_SERVER['REQUEST_URI'] != $myDesiredUrl) {
// hmmh: redirect and/or canonical
} else {
// everything okay url is my desired url
}

I think the core-system has to insetr such code. If I want to do it myself, where should this code be located?
Q2A version: 1.5.4

1 Answer

+1 vote
answered Jan 30, 2013 by q2apro
It is not considered as duplicate content by search engines, google for "canonical meta tag" and check your source code. You will always have one unique url, independently from the requested URL.

see also posts:

http://question2answer.org/qa/search?q=canonical

http://www.question2answer.org/qa/tag/canonical
commented Feb 2, 2013 by krafttrain
Yes, the canonical tag is there but in google webmastertools the two urls are listed as duplicate titles.
...