When it comes to SEO, paginated pages (like /page/2/, /page/3/, etc.) can often pose issues by diluting crawl budget or creating duplicate content. While Yoast SEO is one of the most powerful plugins for WordPress SEO, it doesn’t offer a direct setting in the UI to noindex paginated pages. Fortunately, with a small code tweak, you can tell search engines not to index these pages while still allowing them to follow the links.
Here’s how you can noindex paginated pages using Yoast SEO in just a few steps.
Why Noindex Paginated Pages?
Paginated pages are typically used for archives, blogs, or product listings. These pages don’t usually contain unique content and are just extensions of previous pages. Indexing them can:
- Waste crawl budget
- Create duplicate or thin content issues
- Split link equity across multiple pages
By adding a noindex, follow directive, you prevent these pages from appearing in search results, but still allow search engines to follow the links they contain—preserving SEO value.
How to Noindex Paginated Pages in Yoast SEO
add_filter('wpseo_robots', function($robots) {
if (is_paged()) {
return 'noindex, follow';
}
return $robots;
});
📌 What This Code Does:
- Hooks into the
wpseo_robotsfilter provided by Yoast SEO. - Checks if the current page is paginated using
is_paged(). - If it is, it returns
noindex, followto modify the robots meta tag accordingly.
Best Practices
- Test After Adding: Once you’ve added the code, visit a paginated page and check the HTML source. You should see
<meta name="robots" content="noindex, follow">. - Use a Child Theme: Always add code to a child theme to prevent it from being overwritten during theme updates.
- Monitor Indexing: Use Google Search Console to monitor how Google indexes your content after the change.
Final Thoughts
Noindexing paginated pages is a simple but effective optimization for many WordPress sites, especially blogs or eCommerce stores with extensive pagination. This small code change works seamlessly with Yoast SEO and can help keep your indexed content high-quality and relevant.
By implementing the code snippet above, you give clearer instructions to search engines and maintain better control over how your content appears in search results.