Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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.. – Ashu Jul 20 '13 at 7:14

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? – Ashu Jul 20 '13 at 21:27
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? – Ashu Jul 24 '13 at 8:58

Your Answer


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.