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. Web Design
    4. How to prevent development website subdomain from being indexed?

    How to prevent development website subdomain from being indexed?

    Web Design
    4 3 2.9k
    • 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.
    • SproutDigital
      SproutDigital last edited by

      Hello awesome MOZ Community!

      Our development team uses a sub-domain "dev.example.com" for our SEO clients' websites. This allows changes to be made to the dev site (U/X changes, forms testing, etc.) for client approval and testing.

      An embarrassing discovery was made. Naturally, when you run a "site:example.com" the "dev.example.com" is being indexed. We don't want our clients websites to get penalized or lose killer SERPs because of duplicate content.

      The solution that is being implemented is to edit the robots.txt file and block the dev site from being indexed by search engines.

      My questions is, does anyone in the MOZ Community disagree with this solution? Can you recommend another solution? Would you advise against using the sub-domain "dev." for live and ongoing development websites?

      Thanks!

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

        So....

        1. If the dev site has not been indexed yet, you can block crawlers via robots.txt
        2. If the dev site is already indexed and you want it removed, add meta NOINDEX tag to all pages allow the site to be crawled via robots.txt (reason: you want google to crawl and noticed the noindex tag on the pages so that they remove it from search results. if the site is indexed and you block crawler via robots.txt, google will keep the pages indexed but won't crawl them again). Once deindexed, you can block via robots.txt again

        As long as its blocked (and you build that into your process), having the dev site on the same domain shouldn't be an issue. We have our own dev domain + server that autoblocks all pages from being indexed.

        SproutDigital 1 Reply Last reply Reply Quote 2
        • SproutDigital
          SproutDigital @OlegKorneitchouk last edited by

          Thanks for your prompt feedback Oleg!

          Your proposed action is exactly what we're implementing.

          Randy Holland, Sprout Digital

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

            Hey there, in addition to Oleg's comment you can add an htpasswd file to your server to require a username and password to be entered before any users or robots are allowed to access your website.

            You can find information on setting this up here.

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            • Ability to Transition Completed Wordpress Website to New Coder/Developer
              BlueprintMarketing
              BlueprintMarketing
              1
              7
              101

            • Subdomain to sub-directory migration: New subdirectory not yet indexed
              paints-n-design
              paints-n-design
              0
              2
              70

            • Problems preventing Wordpress attachment pages from being indexed and from being seen as duplicate content.
              SEOguy1
              SEOguy1
              0
              4
              3.0k

            • Spanish website indexed in English, redirect to spanish or english version if i do a new website design?
              OlegKorneitchouk
              OlegKorneitchouk
              0
              2
              280

            • Website removed from Bing and Yahoo index
              vista521
              vista521
              1
              8
              2.1k

            • Is it important to keep your website home index page simple to rank better?
              gazzerman1
              gazzerman1
              0
              14
              375

            • Does meta "Expires" tag affect website cacheing or indexing?
              KristinaKledzik
              KristinaKledzik
              0
              5
              2.1k

            • Subdomains For Real Estate Website
              BigFortune1
              BigFortune1
              0
              7
              1.8k

            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