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. Blocking subdomains without blocking sites...

    Blocking subdomains without blocking sites...

    Technical SEO Issues
    6 2 145
    • 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.
    • SL_SEM
      SL_SEM last edited by

      So let's say I am working for bloggingplatform.com, and people can create free sites through my tools and those sites show up as myblog.bloggingplatform.com. However that site can also be accessed from myblog.com.

      Is there a way, separate from editing the myblog.com site code or files, for me to tell google to stop indexing myblog.bloggingplatform.com while still letting them index myblog.com without inserting any code into the page load?

      This is a simplification of a problem I am running across.

      Basically, Google is associating subdomains to my domain that it shouldn't even index, and it is adversely affecting my main domain. Other than contacting the offending sub-domain holders (which we do), I am looking for a way to stop Google from indexing those domains at all (they are used for technical purposes, and not for users to find the sites).

      Thoughts?

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

        Each subdomain should have a robots.txt file that blocks that specific subdomain. e.g. user1.bloggingplatform.com/robots.txt should have:

        User-agent: *
        Disallow: /

        SL_SEM 1 Reply Last reply Reply Quote 0
        • SL_SEM
          SL_SEM @OlegKorneitchouk last edited by

          I don't think that works. Since both URLs point to the same server the robots.txt file for the test URL would completely kill the main url.

          Or am I missing something?

          OlegKorneitchouk 1 Reply Last reply Reply Quote 0
          • OlegKorneitchouk
            OlegKorneitchouk @SL_SEM last edited by

            bloggingplatform.com/robots.txt

            and

            user1.bloggingplatform.com/robots.txt

            can and should be different. If you disallow at the subdomain level, only the subdomain will be affected. You can search around for other examples of this but i'm certain it works (we have a development domain that is indexed and create subdomains for all clients that aren't indexed and done via individual robots.txt files)

            SL_SEM 1 Reply Last reply Reply Quote 0
            • SL_SEM
              SL_SEM @OlegKorneitchouk last edited by

              You are correct, but that isn't what I was asking.

              user1.bloggingplatform.com and myblog.com point to the same web server files. If I put up a robots.txt on user1.b... I would effectively de-index myblog.com.

              The problem we have run accross is that user205.bloggingplatform.com might be doing something shady, but instead of de-listing the subdomain google kills the primary domain from the index as well.

              Because user205.bloggingplatform.com should only be used for technical reasons, and not be in Google's index I am looking for a way to tell google not to index the sub-domain.

              I think the better way to solve the problem would be to change the technical subdomain's domain though so change it from user205.bloggingplatform.com to user205.bloggingplatformtesting.com.

              Then google can kill that URL all it wants as I don't care.

              OlegKorneitchouk 1 Reply Last reply Reply Quote 0
              • OlegKorneitchouk
                OlegKorneitchouk @SL_SEM last edited by

                Ah, I see now. Try this out http://moz.com/community/q/block-an-entire-subdomain-with-robots-txt#reply_26992 - basically, when a subdomain is identified, it would pull a different file into the robots.txt location (which would contain the disallow: / syntax)

                Read the remaining comments about getting the subdomain removed via GWT.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                • Blocking subdomains with Robots.txt file
                  PaulM01
                  PaulM01
                  0
                  3
                  641

                • Removing site subdomains from Google search
                  mrdavidingram
                  mrdavidingram
                  0
                  6
                  259

                • 2 sites versus a subdomain: Which is better?
                  Britewave
                  Britewave
                  0
                  5
                  71

                • Changing images on site without losing ranking
                  Justin45
                  Justin45
                  0
                  7
                  153

                • Site (Subdomain) Removal from Webmaster Tools
                  irvingw
                  irvingw
                  0
                  7
                  2.0k

                • Robots.txt blocking site or not?
                  RyanKent
                  RyanKent
                  0
                  2
                  445

                • Site links -> anchor text and blocking
                  KeriMorgret
                  KeriMorgret
                  0
                  3
                  1.3k

                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