I have a website running on Django, Python. I'm using django pagination so that users can click next & see further content.

For example, my website is example.com, so when user requests new page it takes them to example.com/?page=2 & example.com/?page=3 & so on . . .

But, the problem is that google has indexed all the paginated webpages (?page=2, ?page=3, etc.) & also showing the duplicate title error inside console.

So, I want to remove all the paginated webpages accept example.com from search results. I tried adding canonical tag <link rel="canonical" href="https://www.example.com/" /> & then tried removing example.com/?page=2 page using console remover, but my request was denied & the page is still there.

I was thinking about a solution, which is to add this code,

{% if not request.get_full_path is '/example.com/' %}
    <meta name="robots" content="noindex, follow">
{% endif %}

But, this logic is not working as it should. The if statement is not working properly.

How we solve this problem? Thank You . . .

  • Why do they need to be removed? If they have different content on the different pages, it is only natural for Google to want to index them. May 28 '18 at 7:19
  • Google now ignores canonical tags if it sees that the content is substantially different, so it isn't a surprise that Google isn't honoring them in your case. May 28 '18 at 7:20
  • Google has said that noindex, follow may as well be noindex, nofollow because Googlebot doesn't pass value to the links on the pages it doesn't index. If your paginated pages are the way you link to other detail pages on your site, that is another reason just to leave them indexed. May 28 '18 at 7:22
  • @StephenOstermiller Sir, I want to remove them because that was showing duplicate title tag error inside search console.
    – user89321
    May 28 '18 at 7:51