Skip to content

SEO: add <meta name="robots" content="noindex" /> to pagination pages after page 1 to tackle duplicate content issues#9658

Closed
johnnyreilly wants to merge 2 commits into
facebook:mainfrom
johnnyreilly:noindex-pagination
Closed

SEO: add <meta name="robots" content="noindex" /> to pagination pages after page 1 to tackle duplicate content issues#9658
johnnyreilly wants to merge 2 commits into
facebook:mainfrom
johnnyreilly:noindex-pagination

Conversation

@johnnyreilly

@johnnyreilly johnnyreilly commented Dec 21, 2023

Copy link
Copy Markdown
Contributor

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Improves SEO behaviour of Docusaurus by indicating that pagination pages which duplicate content should not be indexed by search engines. This does not apply to the initial page; but would apply to pages 2, 3, 4, 5 ....

See also the relevant portion of my blog on the topic: https://johnnyreilly.com/how-we-fixed-my-seo#1-remove-or-noindex-unnecessary-pages

Test Plan

See screenshots from PR preview below demonstrating presence of:

<meta name="robots" content="noindex" />

Test links

Note there is no noindex on the first page of the blog:

https://deploy-preview-9658--docusaurus-2.netlify.app/blog/

image

However, consider page 2 where there is a noindex: https://deploy-preview-9658--docusaurus-2.netlify.app/blog/page/2/

image

Note there is no noindex on the first page of a tags page:

https://deploy-preview-9658--docusaurus-2.netlify.app/blog/tags/release/

image

However, consider page 2 where there is: https://deploy-preview-9658--docusaurus-2.netlify.app/blog/tags/release/page/2/

image

Related issues/PRs

#9657

@netlify

netlify Bot commented Dec 21, 2023

Copy link
Copy Markdown

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit d113b0a
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6584932254aa010008731ff1
😎 Deploy Preview https://deploy-preview-9658--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions

github-actions Bot commented Dec 21, 2023

Copy link
Copy Markdown

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🔴 49 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/installation 🟠 86 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/category/getting-started 🟠 75 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog 🟠 72 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 65 🟢 97 🟢 100 🟢 100 🟠 89 Report
/blog/tags/release 🟠 75 🟢 100 🟢 100 🟠 80 🟠 89 Report
/blog/tags 🟠 75 🟢 100 🟢 100 🟢 90 🟠 89 Report

@johnnyreilly johnnyreilly changed the title feat: add <meta name="robots" content="noindex" /> to pagination pages feat: add <meta name="robots" content="noindex" /> to pagination pages after page 1 Dec 21, 2023
@johnnyreilly johnnyreilly changed the title feat: add <meta name="robots" content="noindex" /> to pagination pages after page 1 SEO: add <meta name="robots" content="noindex" /> to pagination pages after page 1 to tackle duplicate content issues Dec 21, 2023
@johnnyreilly

Copy link
Copy Markdown
Contributor Author

Not proceeding with this so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants