Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I read this link & even this also, but I am still confused. That's why I plan to ask here, Please confirm me with your answer.

My doubt is I have two pages: GridViewPage.php & ListViewPage.php having same content. So according to this in which page I have insert this code <link rel="canonical" href="which url I should put here"/>.

And for opening GridViewPage.php page URL looks like: http://example.com/article/show/abdominal-exercises/abdominal-crunch/79/87/list/.

& for opening GridViewPage.php page my URL looks like: http://example.com/article/show/abdominal-exercises/abdominal-crunch/79/87/grid/.

Note: 79/87 are the dynamic database table id's.

share|improve this question
    
Please do not ask a question again after it has been closed. Edit the original question which can then be reopened if appropriate. –  John Conde Jul 19 '13 at 17:52
add comment

2 Answers

up vote 1 down vote accepted

For a.com/listview.php to be indexed instead gridview.php, you will add the following to gridview.php:

<link rel="canonical" href="http://www.a.com/listview.php" />

And the opposite for the opposite.

share|improve this answer
    
Thank you sir.. –  Sundara Jul 20 '13 at 7:14
add comment

Something to note is that the url in the canonical tag should match your preferred version of your site, either www or non-www. So if your site is http://example.com then the canonical tag would be

<link rel="canonical" href="http://example.com/article/show/abdominal-exercises/abdominal-crunch/79/87/grid/" />
share|improve this answer
    
one doubt, if instead of ..../grid/ in the cononical url if i specified ``..../grid` then is this makes diffrence? –  Sundara Jul 20 '13 at 21:27
2  
You should try and ensure the url in the canonical tag is exactly the same as the target url. –  user29671 Jul 21 '13 at 11:50
    
@dan Here is my real-time implementation example: URL of my first page is like this http://mysite.com/article/show/abdominal-exercises/ball-pass/108/111/list and on my second similar content page,i specified as <link rel="canonical" href="http://mysite.com/article/show/abdominal-exercises/ball-pass/108/111/list"‌​/> in the header. What you say dan,is this correct or i have doing mistake? –  Sundara Jul 24 '13 at 8:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.