0

I have set pagination on index page of my website so Urls are like https://www.myWebsite.com and https://www.myWebsite.com?page=2 and https://www.myWebsite.com?page=3 so on .

I am little confused how should I set canonical links like for eg on the landing page canonical link will be <link rel="canonical" href="https://www.myWebsite.com" /> but for the paginated page canonical link will be <link rel="canonical" href="https://www.myWebsite.com?page=2" /> is this the correct approach.

I have same query for paginated category <link rel="canonical" href="https://www.myWebsite.com/movies?page=2" /> and for tags pages <link rel="canonical" href="https://www.myWebsite.com/tag/tag-name/2" /> is this the correct way.

All the data on my website is unique page one content is not related to content on page 2. Do I even need canonical links. I've already set rel="next" and rel="prev" but I read on some articles google is not using this.

7
  • Does the content of ?page=2 also show up on a different URL? which is exposed to the internet IE example.com/page2 ... The canonical tag tells Google which is the correct URL to use for said content ... The correct URL you want google to use is the URL "you" want. Hence you are telling Google which one is correct, not google telling you. Both pages should agree that say ?page=2 or /tag/2 is the one that should appear in google.
    – Wayne
    May 4 at 23:54
  • if I set canonical link <link rel="canonical" href="https://www.myWebsite.com" /> for my home page and go to page 2 e.g https://www.myWebsite.com?page=2, some SEO inspector tools giving me warning of Canonical and page URL are different should i ignore this warning even though content on page one is not same from page 2. I don't want google to get confused from home page and paginated pages May 5 at 7:34
  • 1
    This a third party SEO inspector? Not Google. If the content of myWebsite.com has unique content and the content of myWebsite.com?page=2 is unique and not the same content as myWebsite.com then the canonical should not be the same, (in other words), like you are saying. The inspector appears to be unaware they are not the same content, the inspector does not understand dynamic content. ... I would advise the people who made the SEO inspector and see what they say. Have you considered making the URLs more friendly IE website.com/page2 instead of website.com?page=2
    – Wayne
    May 5 at 19:00
  • 1
    If you make the URLs more friendly IE website.com/page2/ and can access the URL from website.com?page=2 then the duplicate content which results can be resolved using <link rel="canonical" href="myWebsite.com/page2" /> ... so that you don't have duplicate content, (or to say you do but not intentionally and you want the friendly URL indexed). If you don't have duplicate content exposed then you don't need to use the tag.
    – Wayne
    May 5 at 19:11
  • Thanks for the answer, I'll update my URLs , May 5 at 19:17

1 Answer 1

3

YES, you are.

Google and other search engines use canonical tag

To resolve cases of where duplicate content exist ... Allow me to explain the correct usage before getting into cases of why.

Say www.mywebsite.com/page1 and www.mywebsite.com?page=1 are the same because of the content management system I'm using. And I want to use the friendly URLs. This tag tells google to use www.mywebsite.com/page1 as the URL for this content; so if Google finds www.mywebsite.com?page=1 it will know that is not the best URL for this content ... use www.mywebsite.com/page1

<link rel="canonical" href="https://www.mywebsite.com/page1" />

on www.mywebsite.com?page=1 and www.mywebsite.com/page1

Some software does not recognize dynamic content (they should!)

That www.mywebsite.com?page1 and www.website.com/ are not the same. IE it wants me to put a canonical to www.mywebsite.com" on www.mywebsite.com?page1 Let them know as their program is not looking to see if the pages have the same content or different content.

Dynamic content creates different pages using a www.example.com?tag=value which are completely valid, and not the same as the www.example.com so a canonical to the www.example.com is not wanted on ?tag=value for a CMS system.

Note www.example.com?theme=dark would be the same as www.example.com (except for css) in which case a canonical would point towards the www.example.com page. But that is not the case here.

Cases of duplicate content that can be resolved by canonical

1> I have mysite.example.com publically available online and mysite.com ... because that is the setup of the example hosting company so I can access the site before I register the domain mysite.

2> I have example.com and www.example.com both providing the same content.

3> I have www.example.com and www.example.com on http and https both providing the same content. As the content does not require logging in but I want to use https for privacy of the user. So the https content is mapped to the same http content on my host.

4> I have a CMS system where www.example.com?page=canonical and www.mydomain.com/canonical are the same because the CMS system is designed not to require friendly URL but to be configured to use them if desired.

5> I have an option for users to see pages in different languages via machine translation ... This duplication may happen using Google's own tool? ... www.example.com and www.example.com?lang=spanish

6> I have a custom meme generator which passes the text via the URL but the page is the same, www.example.com/meme?text=this+shows+on+the+image. I want Google and other search engines use canonical tag

<link rel="canonical" href="https://www.example.com/meme" />

htaccess redirect can be used to prevent duplicate content being exposed in some cases.

In the first 4 cases a redirect could also solve the problem although the first one exists for a very good reason. Cases 5 and 6 would not be resolvable using a redirect. Case 4 may have very compelling reasons to exist. It may need to do so for editing the content for example.

Regardless canonical is a needed tool because cases do exist.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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