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
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • 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.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      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.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • 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.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • 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.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • 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. Intermediate & Advanced SEO
    4. Best way to block a sub-domain from being indexed

    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.

    Best way to block a sub-domain from being indexed

    Intermediate & Advanced SEO
    3
    4
    2496
    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.
    • JohnW-UK
      JohnW-UK last edited by

      Hello,

      The search engines have indexed a sub-domain I did not want indexed its on

      old.domain.com and dev.domain.com - I was going to password them but is there a best practice way to block them.

      My main domain default robots.txt says :-

      Sitemap: http://www.domain.com/sitemap.xml

      global

      User-agent: *
      Disallow: /cgi-bin/
      Disallow: /wp-admin/
      Disallow: /wp-includes/
      Disallow: /wp-content/plugins/
      Disallow: /wp-content/cache/
      Disallow: /wp-content/themes/
      Disallow: /trackback/
      Disallow: /feed/
      Disallow: /comments/
      Disallow: /category//
      Disallow: */trackback/
      Disallow: */feed/
      Disallow: /comments/
      Disallow: /
      ?

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

        Hi,

        CleverPhD has some interesting ideas with robots.txt and Google Webmaster Tools, but simply password protecting all dev pages should keep pages out of Google's index. There's no best practice here, since a password wall will keep Googlebot out on its own.

        To be doubly safe, you can also include a meta noindex tag on dev pages.

        Keep in mind that once a page is in Google's index, it's going to take awhile for it to leave (unless you use CleverPhD's method). But, having a blank page in Google's index really isn't all that bad. It's there, but it won't rank for much.

        Hope this helps,

        Kristina

        1 Reply Last reply Reply Quote 0
        • KristinaKledzik
          KristinaKledzik @CleverPhD last edited by

          I've never tried a method like this - FreshFireOne, did you?

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

            First and foremost when you finish all this - password protect your dev instances.  A url will leak out eventually and then this happens.  I know it is a PIA, but it is worth it.

            To remove subdomains.  Go into GWT and register the subdomains as separate websites in GWT.  Create a robots.txt for each subdomain (not the one you mention, you need a robots that is specific to that subdomain that disallows all files.  If you cant do that, have your subdomains include a noindex meta tag on all pages.   You have to be careful with this as you do not want to push out your dev. robots.txt or the noindex meta tags to your production server, but it can be done.  Talk to your devs.    Then go into GWT and use the URL removal tool.  Just leave it blank and it will remove the whole site.

            Poof.  Gone.  You can then watch the GWT accounts.  They will show errors for the dev site like "Severe health issues are found on your site - Some important page has been removed by request."  This is a good error as it confirms that that subdomain is removed.

            We actually used this not on a dev site but on our www1 server that was indexed.  We use a load balancer with multiple copies of the site.  www1 was completing with www.   Using this above did the trick.

            KristinaKledzik 1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              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

            • katseo1

              Best way to set up URL structure for reviews off of PDP pages.

              We are adding existing customer reviews to Product Detail Pages pages. There are about 300 reviews per product so we're going to have to paginate reviews off of the PDP page. I'm wondering what the best url structure for reviews pages is to get the most seo benefit. For example, would it be something like this?  site.com/category/product/reviews/page-1 or something that used parameters, such as: site.com/reviews?product=a Also, what is the best way to show that the internal link on the PDP page to "All Reviews" is a higher priority link than the other links on the page?

              Intermediate & Advanced SEO | | katseo1
              0
            • gozmoz

              Moving html site to wordpress and 301 redirect from index.htm to index.php or just www.example.com

              I found page duplicate content when using Moz crawl tool, see below. http://www.example.com
              Page Authority 40
              Linking Root Domains 31
              External Link Count 138
              Internal Link Count 18
              Status Code 200
              1 duplicate http://www.example.com/index.htm
              Page Authority 19
              Linking Root Domains 1
              External Link Count 0
              Internal Link Count 15
              Status Code 200
              1 duplicate I have recently transfered my old html site to wordpress.
              To keep the urls the same I am using a plugin which appends .htm at the end of each page. My old site home page was index.htm. I have created index.htm in wordpress as well but now there is a conflict of duplicate content. I am using latest post as my home page which is index.php Question 1.
              Should I also use redirect 301 im htaccess file to transfer index.htm page authority (19) to www.example.com If yes, do I use
              Redirect 301 /index.htm http://www.example.com/index.php
              or
              Redirect 301 /index.htm http://www.example.com Question 2
              Should I change my "Home" menu link to http://www.example.com instead of http://www.example.com/index.htm that would fix the duplicate content, as indx.htm does not exist anymore. Is there a better option? Thanks

              Intermediate & Advanced SEO | | gozmoz
              0
            • atomiconline

              Best way to "Prune" bad content from large sites?

              I am in process of pruning my sites for low quality/thin content. The issue is that I have multiple sites with 40k + pages and need a more efficient way of finding the low quality content than looking at each page individually. Is there an ideal way to find the pages that are worth no indexing that will speed up the process but not potentially harm any valuable pages? Current plan of action is to pull data from analytics and if the url hasn't brought any traffic in the last 12 months then it is safe to assume it is a page that is not beneficial to the site. My concern is that some of these pages might have links pointing to them and I want to make sure we don't lose that link juice. But, assuming we just no index the pages we should still have the authority pass along...and in theory, the pages that haven't brought any traffic to the site in a year probably don't have much authority to begin with. Recommendations on best way to prune content on sites with hundreds of thousands of pages efficiently?  Also, is there a benefit to no indexing the pages vs deleting them? What is the preferred method, and why?

              Intermediate & Advanced SEO | | atomiconline
              0
            • fablau

              What's the best way to noindex pages but still keep backlinks equity?

              Hello everyone, Maybe it is a stupid question, but I ask to the experts... What's the best way to noindex pages but still keep backlinks equity from those noindexed pages? For example, let's say I have many pages that look similar to a "main" page which I solely want to appear on Google, so I want to noindex all pages with the exception of that "main" page... but, what if I also want to transfer any possible link equity present on the noindexed pages to the main page? The only solution I have thought is to add a canonical tag pointing to the main page on those noindexed pages... but will that work or cause wreak havoc in some way?

              Intermediate & Advanced SEO | | fablau
              3
            • IsaCleanse

              Redirect domain or keep separate domains in each country?

              Hi all Hoping this might be something that can be answered given the number of variables 🙂 
              My main site is www.isacleanse.com.au (Obviously targeted to Australian Market) and also www.isacleanse.co.nz targeted to NZ. The main Keywords im targeting are 'Isagenix' for both and also Isagenix Australia, Isagenix Perth, Sydney (Australian cities) and Isagenix NZ, Isagenix New Zealand, Isagenix Auckland etc.. for NZ The Australian site gets a lot more traffic and Australian market gets a lot more searches - I also have a section www.isacleanse.com.au/isagenix-new-zealand/ on the Australian site. The question is am I best off redirrecting the .co.nz domain completley to the Australian Domain to give it extra SEO Juice?

              Intermediate & Advanced SEO | | IsaCleanse
              0
            • netviper

              What is the best way to get anchor text cloud in line?

              So I am working on a website, and it has been doing seo with keyword links for a a few years. The first branded terms comes in a 7% in 10th in the list on Ahefs. The keyword terms are upwards of 14%. What is the best way to get this back in line?  It would take several months to build keyword branded terms to make any difference - but it is doable. I could try link removal, but less than 10% seem to actually get removed -- which won't make a difference. The disavow file doesn't really seem to do anything either. What are your suggestions?

              Intermediate & Advanced SEO | | netviper
              0
            • nicole.healthline

              Best way to block a search engine from crawling a link?

              If we have one page on our site that is is only linked to by one other page, what is the best way to block crawler access to that page? I know we could set the link to "nofollow" and that would prevent the crawler from passing any authority, and we can set the page to "noindex" to prevent it from appearing in search results, but what is the best way to prevent the crawler from accessing that one link?

              Intermediate & Advanced SEO | | nicole.healthline
              0
            • ContentWriterMicky

              How to resolve Duplicate Page Content issue for root domain & index.html?

              SEOMoz returns a Duplicate Page Content error for a website's index page, with both domain.com and domain.com/index.html isted seperately. We had a rewrite in the htacess file, but for some reason this has not had an impact and we have since removed it. What's the best way (in an HTML website) to ensure all index.html links are automatically redirected to the root domain and these aren't seen as two separate pages?

              Intermediate & Advanced SEO | | ContentWriterMicky
              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
            Free SEO Tools
            • Domain Authority Checker
            • Link Explorer
            • Keyword Explorer
            • Competitive Research
            • Brand Authority 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.