• majorAlexa

        See all notifications

        Skip to content
        Moz logo Menu open Menu close
        • Products
          • Moz Pro
          • Moz Pro Home
          • Moz Local
          • Moz Local Home
          • STAT
          • Moz API
          • Moz API Home
          • Compare SEO Products
          • Moz Data
        • Free SEO Tools
          • Domain Analysis
          • Keyword Explorer
          • Link Explorer
          • Competitive Research
          • MozBar
          • More Free SEO Tools
        • Learn SEO
          • Beginner's Guide to SEO
          • SEO Learning Center
          • Moz Academy
          • MozCon
          • Webinars, Whitepapers, & Guides
        • Blog
        • Why Moz
          • Digital Marketers
          • Agency Solutions
          • Enterprise Solutions
          • Small Business Solutions
          • The Moz Story
          • New Releases
        • Log in
        • Log out
        • Products
          • Moz Pro

            Your all-in-one suite of SEO essentials.

          • Moz Local

            Raise your local SEO visibility with complete local SEO management.

          • STAT

            SERP tracking and analytics for enterprise SEO experts.

          • Moz API

            Power your SEO with our index of over 44 trillion links.

          • Compare SEO Products

            See which Moz SEO solution best meets your business needs.

          • Moz Data

            Power your SEO strategy & AI models with custom data solutions.

          Let your business shine with Listings AI
          Moz Local

          Let your business shine with Listings AI

          Learn more
        • Free SEO Tools
          • Domain Analysis

            Get top competitive SEO metrics like DA, top pages and more.

          • Keyword Explorer

            Find traffic-driving keywords with our 1.25 billion+ keyword index.

          • Link Explorer

            Explore over 40 trillion links for powerful backlink data.

          • Competitive Research

            Uncover valuable insights on your organic search competitors.

          • MozBar

            See top SEO metrics for free as you browse the web.

          • More Free SEO Tools

            Explore all the free SEO tools Moz has to offer.

          NEW Keyword Suggestions by Topic
          Moz Pro

          NEW Keyword Suggestions by Topic

          Learn more
        • Learn SEO
          • Beginner's Guide to SEO

            The #1 most popular introduction to SEO, trusted by millions.

          • SEO Learning Center

            Broaden your knowledge with SEO resources for all skill levels.

          • On-Demand Webinars

            Learn modern SEO best practices from industry experts.

          • How-To Guides

            Step-by-step guides to search success from the authority on SEO.

          • Moz Academy

            Upskill and get certified with on-demand courses & certifications.

          • MozCon

            Save on Early Bird tickets and join us in London or New York City

          Unlock flexible pricing & new endpoints
          Moz API

          Unlock flexible pricing & new endpoints

          Find your plan
        • Blog
        • Why Moz
          • Digital Marketers

            Simplify SEO tasks to save time and grow your traffic.

          • Small Business Solutions

            Uncover insights to make smarter marketing decisions in less time.

          • Agency Solutions

            Earn & keep valuable clients with unparalleled data & insights.

          • Enterprise Solutions

            Gain a competitive edge in the ever-changing world of search.

          • The Moz Story

            Moz was the first & remains the most trusted SEO company.

          • New Releases

            Get the scoop on the latest and greatest from Moz.

          Surface actionable competitive intel
          New Feature

          Surface actionable competitive intel

          Learn More
        • Log in
          • Moz Pro
          • Moz Local
          • Moz Local Dashboard
          • Moz API
          • Moz API Dashboard
          • Moz Academy
        • Avatar
          • Moz Home
          • Notifications
          • Account & Billing
          • Manage Users
          • Community Profile
          • My Q&A
          • My Videos
          • Log Out

        The Moz Q&A Forum

        • Forum
        • Questions
        • My Q&A
        • Users
        • Ask the Community

        Welcome to the Q&A Forum

        Browse the forum for helpful insights and fresh discussions about all things SEO.

        1. Home
        2. SEO Tactics
        3. Intermediate & Advanced SEO
        4. Yoast & rel canonical for paginated Wordpress URLs

        Moz Q&A is closed.

        After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

        Yoast & rel canonical for paginated Wordpress URLs

        Intermediate & Advanced SEO
        2
        9
        13138
        Loading More Posts
        • Watching

          Notify me of new replies.
          Show question in unread.

        • Not Watching

          Do not notify me of new replies.
          Show question in unread if category is not ignored.

        • Ignoring

          Do not notify me of new replies.
          Do not show question in unread.

        • Oldest to Newest
        • Newest to Oldest
        • Most Votes
        Reply
        • Reply as question
        Locked
        This topic has been deleted. Only users with question management privileges can see it.
        • aactive
          aactive last edited by

          Hello, our Wordpress blog at http://www.jobs.ca/career-resources has a rel canonical issue since we added pagination to the front page and category-pages. We're using Yoast and it's incorrectly applying a rel-canonical meta tag referencing page 1 on page 2, 3, etc. This is a known misuse of the rel-canonical tag (per Google's Webmaster Blog - http://googlewebmastercentral.blogspot.ca/2013/04/5-common-mistakes-with-relcanonical.html, which says rel-canonical should be replaced with rel-prev and rel-next for page 2, 3, etc.).

          We don't see a way to specify anywhere in Yoast's options to correct this behaviour for page 2, 3, etc. Yoast allows you to override a page's canonical URL, otherwise it automatically uses the Wordpress permalink.

          My question is, does anyone know how to configure Yoast to properly replace rel-canonical tags with rel-prev and rel-next for paginated URLs, or do I need to look at another plugin or customize the behavior directly in my child theme code?

          This issue was brought up here as well: http://a-moz.groupbuyseo.org/community/q/canonical-help, but the only response did not relate to Yoast.

          (We're using Wordpress 3.6.1 and Yoast "Wordpress SEO" 1.4.18)

          1 Reply Last reply Reply Quote 0
          • evolvingSEO
            evolvingSEO @aactive last edited by

            Thanks for posting this Shaun! People actually do come back and read these months to come and these Q&A's will return in search results, so you've made this a really valuable page for future readers - thanks!

            -Dan

            1 Reply Last reply Reply Quote 0
            • aactive
              aactive last edited by

              I've now fixed this issue by refactoring our child theme so the WP queries occur before the header (inserting the content later).

              Because we're using a custom homepage template for the front page and a custom "category page" template, I've also had to modify Yoast's "canonical" and "adjacent_rel_links" functions to understand the pagination for those pages (otherwise Yoast simply detects these as "singular" pages and only applies the rel canonical pointing to page 1, regardless of the current page).

              I used the following code to allow overriding Yoast in my child-theme's functions.php:

              if (defined('WPSEO_VERSION')) {
                  function custom_wpseo_override() {

              global $wpseo_front;

              remove_action('wpseo_head', array($wpseo_front, 'canonical'), 20);
                  add_action('wpseo_head', 'custom_wpseo_canonical', 20);
                  remove_action('wpseo_head', array($wpseo_front, 'adjacent_rel_links'), 21);
                  add_action('wpseo_head', 'custom_wpseo_adjacent_rel_links', 21);
                  }
                  add_action('init','custom_wpseo_override');
              }

              evolvingSEO 1 Reply Last reply Reply Quote 1
              • evolvingSEO
                evolvingSEO @aactive last edited by

                Shaun

                Great, thanks - happy to help!

                -Dan

                1 Reply Last reply Reply Quote 0
                • aactive
                  aactive @evolvingSEO last edited by

                  Hi Dan,

                  Yeah it must me some kind of conflict with the theme or another plugin... We're not using Thesis or Genesis but we have modified header.php in our child theme to replace the masthead markup (just stuff within the body tag). I just noticed the other day that both the theme (ExtraNews by ThemeForest) and Yoast are adding their own <title>tags, so there may be more conflicts than one.</p> <p>Marking your response as an answer because you proved that Yoast can insert the rel next & prev tags and you've helped me get to the point where I'm 80% sure it's a theme conflict. Thanks again!</p></title>

                  evolvingSEO 1 Reply Last reply Reply Quote 0
                  • evolvingSEO
                    evolvingSEO @aactive last edited by

                    Hi Shaun

                    Yes in terms of keeping strictly to Google's guidelines, I agree that Yoast should in theory use either prev/next or canonical on subpages, but not both.

                    I am honestly not certain the settings it could be otherwise, as "subpages of archives" is the only one I know of that handles pagination.

                    Could there be another plugin or your theme (or custom coding in header.php) causing a conflict? One thing you can do is shut off other plugins one by one to diagnose. You can switch themes or switch to the default header.php file included with WordPress, but I (for obvious reasons) do NOT recommend doing that on a live website. I'm not sure if you have a testing environment.

                    Are you using a framework like Thesis or Genesis?  Sometimes those can cause unexpected things to happen as well.

                    -Dan

                    aactive 1 Reply Last reply Reply Quote 1
                    • aactive
                      aactive @evolvingSEO last edited by

                      Hi Dan, and thanks very much for your response.

                      Per your screenshot, I believe it's not ideal that there's a rel canonical meta-tag pointing to the current partial page (page 2).

                      From the Google blog link above: "In cases of paginated content, we recommend either a rel=canonical from component pages to a single-page version of the article, or to use rel=”prev” and rel=”next” pagination markup."

                      They mention here https://support.google.com/webmasters/answer/1663744?hl=en (2nd last point) that it's optional to include a rel canonical tag like yours, but without the "Noindex subpages of archives" option enabled, it would probably cause your separate post pages to be indexed, which may or may not be ideal for you depending on how authoritative/complete each individual page's content is.

                      Yoast is definitely adding the rel prev & next meta-tags for you though, which is exactly what I need (minus the rel canonical). I wonder which exact setting is enabling that for you... We have very few Yoast options enabled/configured at all currently, but I don't see any that are specific to the rel prev & next tags.

                      I've tried enabling the "Noindex subpages of archives" per your suggestion, but it didn't result in any change in the meta-tags for my site (verified after caches cleared too).

                      Any other suggestions you have would be great. My colleagues want to keep Yoast for it's other features, so I may go the route of forking/modifying the Yoast plugin code to fit our situation if needed.

                      Thanks for your time!

                      evolvingSEO 1 Reply Last reply Reply Quote 0
                      • evolvingSEO
                        evolvingSEO last edited by

                        Hi Shaun

                        Dan here, one of the Moz Associates - we're very sorry for the delay!

                        I've attached a screenshot of my own personal company site which uses the Yoast Plugin - just want to verify the code as seen here is what I would consider "correct" and best practice for WordPress pagination.

                        That code has not require any custom coding or anything. So either we need to get the Yoast settings correct, or something else may be interfering with Yoast.

                        Please first try going to: Yoast SEO->Titles/Meta and select "Noindex subpages of archives". This to my knowledge is the only setting that needs to be made to handle pagination correctly.

                        Let us know if that works - and again, apologies for the delay. Sometimes we have quite a backlog and don't pick up right away if the community has not appropriately answered a question.

                        Thanks!

                        -Dan

                        lRYcPOhI

                        aactive 1 Reply Last reply Reply Quote 1
                        • aactive
                          aactive last edited by

                          Do the 30+ people who've viewed this question think it answered itself? I tried to be thorough, but was it too much to read? Or... Is this not a great place to ask such a question?

                          1 Reply Last reply Reply Quote 1
                          • 1 / 1
                          • First post
                            Last post

                          Browse Questions

                          Explore more categories

                          • Moz Tools

                            Chat with the community about the Moz tools.

                          • SEO Tactics

                            Discuss the SEO process with fellow marketers

                          • Community

                            Discuss industry events, jobs, and news!

                          • Digital Marketing

                            Chat about tactics outside of SEO

                          • Research & Trends

                            Dive into research and trends in the search industry.

                          • Support

                            Connect on product support and feature requests.

                          • See all categories

                          Related Questions

                          • moon-boots

                            Remove Product & Category from URLS in Wordpress

                            Does anyone have experience removing /product/ and /product-category/, etc. from URLs in wordpress? I found this link from Wordpress which explains that this shouldn't be done, but I would like some opinions of those who have tried it please. https://docs.woocommerce.com/document/removing-product-product-category-or-shop-from-the-urls/

                            Intermediate & Advanced SEO | | moon-boots
                            0
                          • alexrbrg

                            URL in russian

                            Hi everyone, I am doing an audit of a site that currently have a lot of 500 errors due to the russian langage. Basically, all the url's look that way for every page in russian: http://www.exemple.com/ru-kg/pешения-для/food-packaging-machines/
                            http://www.exemple.com/ru-kg/pешения-для/wood-flour-solutions/
                            http://www.exemple.com/ru-kg/pешения-для/cellulose-solutions/ I am wondering if this error is really caused by the server or if Google have difficulty reading the russian langage in URL's. Is it better to have the URL's only in english ?

                            Intermediate & Advanced SEO | | alexrbrg
                            0
                          • unirmk

                            Rel=canonical and internal links

                            Hi Mozzers, I was musing about rel=canonical this morning and it occurred to me that I didnt have a good answer to the following question: How does applying a rel=canonical on page A referencing page B as the canonical version affect the treatment of the links on page A? I am thinking of whether those links would get counted twice, or in the case of ver-near-duplicates which may have an extra sentence which includes an extra link, whther that extra link would count towards the internal link graph or not. I suspect that google would basically ignore all the content on page A and only look to page B taking into account only page Bs  links. Any thoughts? Thanks!

                            Intermediate & Advanced SEO | | unirmk
                            0
                          • luxresorts

                            Duplicate Title tags even with rel=canonical

                            Hello, We were having duplicate content in our blog (a replica of each post automatically was done by the CMS), until we recently implemented a rel=canonical tag to all the duplicate posts (some 5 weeks ago). So far, no duplicate content were been found, but we are still getting duplicate title tags, though the rel=canonical is present. Any idea why is this the case and what can we do to solve it? Thanks in advance for your help. Tej Luchmun

                            Intermediate & Advanced SEO | | luxresorts
                            0
                          • SEO_Promenade

                            When is it recommended to use a self referencing rel "canonical"?

                            In what type of a situation is it the best type of practice to use a self referencing rel "canonical" tag? Are there particular practices to be cautious of when using a self referencing  rel "canonical" tag? I see this practice used mainly with larger websites but I can't find any information that really explains when is a good time to make use of this practice for SEO purposes. Appreciate all feedback. Thank you in advance.

                            Intermediate & Advanced SEO | | SEO_Promenade
                            0
                          • mark_baird

                            Should I use rel=canonical on similar product pages.

                            I'm thinking of using rel=canonical for similar products on my site. Say I'm selling pens and they are al very similar. I.e. a big pen in blue, a pack of 5 blue bic pens, a pack of 10, 50, 100 etc. should I rel=canonical them all to the best seller as its almost impossible to make the pages unique. (I realise the best I realise these should be attributes and not products but I'm sure you get my point) It seems sensible to have one master canonical page for bic pens on a site that has a great description video content and good images plus linked articles etc rather than loads of duplicate looking pages. love to hear thoughts from the Moz community.

                            Intermediate & Advanced SEO | | mark_baird
                            0
                          • WebMarketingandDesign

                            Multiple URLs for the same page

                            I am working with a client and recently discovered that they have several URLs that go to the same page. http://www.maps.com/FunFacts.aspx
                            http://www.maps.com/funfacts.aspx
                            http://www.maps.com/FunFacts.aspx?nav=FF
                            http://www.maps.com/FunFacts.aspx?nav=FS
                            http://www.maps.com/funfacts.aspx?nav=FF
                            http://www.maps.com/funfacts.aspx?nav=ffhttp://www.maps.com/FunFacts.aspx?nav=MShttp://www.maps.com/funfacts.aspx?nav=
                            http://www.maps.com/FunFacts.aspx?nav=FF#
                            http://www.maps.com/FunFacts
                            http://www.maps.com/funfacts.aspx?.nav=FF I am afraid this is happening all over the site. So, my question is: Is this hurting the SEO and how? If so what is the best way to go about fixing this problem? Thanks for your help!

                            Intermediate & Advanced SEO | | WebMarketingandDesign
                            0
                          • Romancing

                            URL Length or Exact Breadcrumb Navigation URL? What's More Important

                            Basically my question is as follows, what's better: www.romancingdiamonds.com/gemstone-rings/amethyst-rings/purple-amethyst-ring-14k-white-gold (this would fully match the breadcrumbs). or www.romancingdiamonds.com/amethyst-rings/purple-amethyst-ring-14k-white-gold (cutting out the first level folder to keep the url shorter and the important keywords are closer to the root domain). In this question http://www.seomoz.org/qa/discuss/37982/url-length-vs-url-keywords I was consulted to drop a folder in my url because it may be to long. That's why I'm hesitant to keep the bradcrumb structure the same. To the best of your knowldege do you think it's best to drop a folder in the URL to keep it shorter and sweeter, or to have a longer URL and have it match the breadcrumb structure? Please advise, Shawn

                            Intermediate & Advanced SEO | | Romancing
                            0

                          Get started with Moz Pro!

                          Unlock the power of advanced SEO tools and data-driven insights.

                          Start my free trial
                          Products
                          • Moz Pro
                          • Moz Local
                          • Moz API
                          • Moz Data
                          • STAT
                          • Product Updates
                          Moz Solutions
                          • SMB Solutions
                          • Agency Solutions
                          • Enterprise Solutions
                          • Digital Marketers
                          Free SEO Tools
                          • Domain Authority Checker
                          • Link Explorer
                          • Keyword Explorer
                          • Competitive Research
                          • Brand Authority Checker
                          • Local Citation Checker
                          • MozBar Extension
                          • MozCast
                          Resources
                          • Blog
                          • SEO Learning Center
                          • Help Hub
                          • Beginner's Guide to SEO
                          • How-to Guides
                          • Moz Academy
                          • API Docs
                          About Moz
                          • About
                          • Team
                          • Careers
                          • Contact
                          Why Moz
                          • Case Studies
                          • Testimonials
                          Get Involved
                          • Become an Affiliate
                          • MozCon
                          • Webinars
                          • Practical Marketer Series
                          • MozPod
                          Connect with us

                          Contact the Help team

                          Join our newsletter
                          Moz logo
                          © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                          • Accessibility
                          • Terms of Use
                          • Privacy

                          Looks like your connection to Moz was lost, please wait while we try to reconnect.