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. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Wordpress noindex

    Wordpress noindex

    Technical SEO Issues
    15 6 2.6k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • NakulGoyal
      NakulGoyal last edited by

      It should.If that does not work for some reason, try Yoast. One of these 2 plugins should be able to deindex these pages for you. I presume you are using the latest version of Wordpress as well as the Plugin.

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

        There is a plugin way – and a coding way…

        I will explain both

        Plugin version is good for individual posts / coding way is a mass archive way…

        PLUGIN VERSION

        Using a plugin called WordPress SEO by Yoast.. you can go into the previous posts and do the following.

        Open the POST dashboard in your WordPress blog.

        Find the post/s you are interested in working with.

        Click ‘Edit’ post

        Then scroll down to the WordPress SEO by Yoast section on the bottom anc click ADVANCED

        From there.. you can select noindex / nofollow for that post – as well as a few advanced meta tags.

        You can do this for any or all of your posts…  😃

        CODING VERSION

        Step 1
        In your theme folder locate the following files:

        /wp-content/themes/yourtheme/

        Archive.php

        Header.php

        Open them both up.

        Step 2
        First thing to do is SAVE the header file as:

        header-archive.php

        with that new version open add the following code into the header section:

        Then save it.

        Upload that file to your wp theme folder online.

        Step 3 now go to the open archive.php file and find and replace the following:

        FIND:

        REPLACE WITH:

        Save and upload that file to your theme folder as well.

        Now you have just MASS added a NOINDEX / NOFOLLOW to all of your archive pages – but NOT the individual post pages themselves.

        Hope this helps!

        blacey 2 Replies Last reply Reply Quote 2
        • blacey
          blacey @PeterM22 last edited by

          That will only put noindex on the date archives.

          I noticed the same problem and wrote an article on how to avoid duplication in WordPress. For a fresh WordPress installation with 10 published posts, Google ends up indexing close to 30 URLs, all pointing back to just 10 unique articles, because of the date, author and category archive pages.

          In header.php of your theme add the following code:

           1){
            echo '';
          } ?>
          
          ';
          } ?>
          
          ';
          } ?>
          

          If you want, this could be condensed to:

          $paged > 1 || is_author() || is_trackback()){
            echo '';
          } ?>
          

          You can read more at my blog: http://www.laceytechsolutions.co.uk/blog/wordpress-development/avoiding-duplicate-content-in-wordpress

          JonathanRolande 1 Reply Last reply Reply Quote 2
          • blacey
            blacey @surgeonsadvisor last edited by

            This seems overly complex for a coding solution. All you need is 3 lines of code (max) in header.php of your theme (See my reply above)

            1 Reply Last reply Reply Quote 0
            • blacey
              blacey @surgeonsadvisor last edited by

              Also, if you use the plugin to set the posts to no-follow and you want to change SEO plugin changes are those settings won't be transferred, if you code the solution into the theme its plugin independent and (in my eyes) the best way to go about avoiding duplication in WordPress.

              surgeonsadvisor blacey 2 Replies Last reply Reply Quote 0
              • surgeonsadvisor
                surgeonsadvisor @blacey last edited by

                I agree Ben, that coding into the theme itself is the best way to do this - however since there are a  few ways to do this task - we wanted to offer various solutions.

                1 Reply Last reply Reply Quote 0
                • PeterM22
                  PeterM22 @PeterM22 last edited by

                  Thanks so much Ben, This has done exactly what I wanted 😄

                  1 Reply Last reply Reply Quote 0
                  • blacey
                    blacey @blacey last edited by

                    I fully understand that. People at my work fully advocate the use of plugins, I personally believe that somethings should be hard-coded into the theme (This being one of those things).

                    Chances are once you find an SEO plugin you tend to stick with it until you notice issues or find one that does things better.

                    I'm surprised that WordPress doesn't do more to help prevent duplicate content.

                    1 Reply Last reply Reply Quote 0
                    • blacey
                      blacey @PeterM22 last edited by

                      Brilliant. Glad I could help.

                      1 Reply Last reply Reply Quote 0
                      • JonathanRolande
                        JonathanRolande @blacey last edited by

                        Thanks, this helped me 🙂

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        • What should I name my Wordpress homepage?
                          BlueprintMarketing
                          BlueprintMarketing
                          0
                          6
                          296

                        • Structured markup for wordpress
                          evolvingSEO
                          evolvingSEO
                          1
                          4
                          80

                        • Wordpress and Redirects?
                          StephenForde
                          StephenForde
                          0
                          12
                          163

                        • Spamming and Wordpress
                          vibelingo
                          vibelingo
                          0
                          10
                          169

                        • SEO for Wordpress
                          Intergen
                          Intergen
                          0
                          20
                          900

                        • Wordpress question
                          DavidKonigsberg
                          DavidKonigsberg
                          0
                          2
                          255

                        • Noindexing categories in Wordpress
                          Muhammad.IST
                          Muhammad.IST
                          1
                          5
                          632

                        • What should be noindexed on a Wordpress blog?
                          MauroMazzocchini
                          MauroMazzocchini
                          0
                          10
                          1.4k

                        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 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                        • Accessibility
                        • Terms of Use
                        • Privacy