undefined
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 reputation grow with Reviews AI
    Moz Local

    Let your reputation grow with Reviews 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
  • 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. On-Page Optimization
  4. No-index all the posts of a category

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.

No-index all the posts of a category

On-Page Optimization
2
5
3.3k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • salvyy
    salvyy last edited by Dec 12, 2014, 2:20 PM

    Hi everyone!

    I would like no-indexing all the posts of a specific category of my wordpress site.

    The problem is that the structure of my URL is composed without /category/: www.site-name.ext/date/post-name/
    so without /category-name/

    Is possibile to disallow the indexing of all the posts of the category via robots.txt?

    Using Yoast Plugin I can put the no-index for each post, but I would like to put the no-index (or disallow/) a time for all the post of the category.

    Thanks in advance for your help and sorry for my english.

    • Mike
    1 Reply Last reply Reply Quote 0
    • salvyy
      salvyy last edited by Dec 12, 2014, 5:35 PM Dec 12, 2014, 5:35 PM

      Sure, without /category/ in the URL structure I can't block Googlebot using the robots.txt

      No problem, now I can use the noindex for all the posts.

      Thank you so much Oleg.

      Regards,

      • MIke
      1 Reply Last reply Reply Quote 0
      • OlegKorneitchouk
        OlegKorneitchouk @salvyy last edited by Dec 12, 2014, 5:29 PM Dec 12, 2014, 5:29 PM

        With that code, Google won't index any pages within that particular category.

        Unfortunately, without a specific folder pattern, you cannot block via robots.txt

        1 Reply Last reply Reply Quote 0
        • salvyy
          salvyy last edited by Dec 12, 2014, 4:57 PM Dec 12, 2014, 4:57 PM

          Hi Oleg, thanks for your help.

          I did just some tests and does it seems to work fine.

          Do you think is possible to block Google bot to indexing all the post of a category?in this way (disallow/ in the robots.txt) I could save the Google crawle budget for the pages of my site that I want to index.

          Thanks a lot for your help Oleg.

          Have a nice weekend,- Mike

          OlegKorneitchouk 1 Reply Last reply Dec 12, 2014, 5:29 PM Reply Quote 0
          • OlegKorneitchouk
            OlegKorneitchouk last edited by Dec 12, 2014, 4:06 PM Dec 12, 2014, 4:00 PM

            Wordpress Admin > Posts > Categories > Edit the category you want to noindex > Set "always noindex" for "Noindex this category" box

            EDIT: looks like that just noindexes the actual category page.

            Here is a workaround I found...

            1. Find the category ID (WP Admin > Posts > Categories > Edit the category you want to noindex > look at URL for the tag_ID # (this is the category ID))

            2. Edit your theme header and include:

            <?php if (is_single() && in_category(array(###)))  { 
            echo '';
            } ?>
            

            where ### is the category ID

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 out of 5
            • First post
              1/5
              Last post

            Got a burning SEO question?

            Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


            Start my free trial


            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

            • Viktoriia1805

              The particular page cannot be indexed by Google

              indexing googlesearchconsole onpage

              Hello, Smart People!
              We need help solving the problem with Google indexing.
              All pages of our website are crawled and indexed. All pages, including those mentioned, meet Google requirements and can be indexed. However, only this page is still not indexed.
              Robots.txt is not blocking it.
              We do not have a tag "nofollow"
              We have it in the sitemap file.
              We have internal links for this page from indexed pages.
              We requested indexing many times, and it is still grey.
              The page was established one year ago.
              We are open to any suggestions or guidance you may have. What else can we do to expedite the indexing process?

              On-Page Optimization | Aug 28, 2024, 11:19 AM | Viktoriia1805
              1
            • xtrapsp

              Should posts show in multiple categories?

              seo wordpress

              Hi all, For context, I'm trying to Silo my content more efficiently. I've just moved all content into their own SILO'd categories and removed them from duplicate categories. As such, posts now sit only in 1 category. My question here is: Should my posts be showing in both the parent category and its sub category or just the sub-category? I've currently got this only showing in the sub-categories it's relevant to. For example:
              Post name: Shimano Fishing Rod Review
              Parent Category: Fishing Rods
              Sub Category: Shimano And the post only shows inside the Shimano Category

              On-Page Optimization | Sep 18, 2021, 3:08 AM | xtrapsp
              0
            • bedynamic

              Using h2 for category on ecommerce website

              Hi, I am working on an ecommerce site and the main category - lets call them car widgets - is using a h1 at the top of the page which is great.  There are 4 sub categories on the page - lets call one of them red widget.  The only content on the page is the sub category name and an image.  Should the sub category red widget use a h2? Thanks S

              On-Page Optimization | Feb 14, 2018, 4:58 PM | bedynamic
              0
            • CosiCrawley

              Google Console returning 0 pages as being indexed

              HI there, I submitted my site notebuster.net to Search Console over a month ago and it is showing 0 pages as being indexed under the index status report. I know this isn't right as I can see that in google alone by typing in (site:notebusters.net) there are 113 pages indexed. Any idea why this might be? Thanks

              On-Page Optimization | May 26, 2016, 10:13 PM | CosiCrawley
              0
            • Gavin.Atkinson

              Can lazy loading of images affect indexing?

              I am trying to diagnose a massive drop in Google rankings for my website and noticed that the date of the ranking and traffic drop coincides with Google suddenly only indexing about 10% of my images, whereas previously it was indexing about 95% of them. Wondering if addition of lazy load script to images (so they don't load from the server until visible in the browser) could cause this index blocking?

              On-Page Optimization | Sep 23, 2016, 4:58 AM | Gavin.Atkinson
              1
            • DonaldS

              New site pages are indexed but not ranking for anything

              I just built this site for a client http://primedraftarchitecture.com.  It went live 3 weeks ago and the pages are getting indexed as per Webmaster Tools.  But I'm not seeing it rank for anything. We're adding blog articles regularly and used Moz Local for local links and have been building links in other local directories (probably about 15 so far). Usually I get some rankings, although very low, after just a week or two for new sites. Does anyone see anything glaring that may be causing a problem?

              On-Page Optimization | Mar 5, 2015, 12:31 PM | DonaldS
              1
            • lcourse

              Best practice for footer in ecommerce - Shall I add Top Category links?

              What would you recommend regarding links to "Top Products" and "Top Categories" in footer? Would you add them to give extra link juice to top categories? would you try to avoid category links in footer that are already in the header navigationor in the main content area to avoid linking twice from all pages? would you vary these top category links in footer according to main category

              On-Page Optimization | Oct 22, 2013, 6:43 PM | lcourse
              0
            • 2bloggers

              Do Parent Categories Hurt SEO?

              I have parent categories and subcategories. Will it be harder for the subcategories to rank well because they have a parent category? The URL is longer, for one. I am just wondering if I should not have parent categories. I have one category page doing really well and I am trying to boost the others (most of which are subcategories) and this is a concern for me. Thanks! Edit: I also have a category that has 2 parent categories. I want it automatically in those 2 categories and one of its own. By itself it is very important keyword. Is this ok or should I have it be a parent category?

              On-Page Optimization | Jun 27, 2013, 2:31 PM | 2bloggers
              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.