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. Other Research Tools
    4. How do I disallow crawl on a directory when it's a prefix to my site's URL?

    How do I disallow crawl on a directory when it's a prefix to my site's URL?

    Other Research Tools
    3 3 88
    • 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.
    • Simon-Plan
      Simon-Plan last edited by

      I am trying to disallow our media repository (hosted elsewhere, but appears as a directory on our site) from being crawled by robots but it is not a subdirectory of the site, it's a prefix.

      So I need to disallow: mediabank.mywebsite.org

      Not: mysite.org/mediabank

      What would I need to put in my robots.txt and/or the other host's robots.txt to make this happen?

      Thanks!

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

        Hi,

        Please check this old thread on the same topic @ https://moz.com/community/q/block-an-entire-subdomain-with-robots-txt

        Thanks

        1 Reply Last reply Reply Quote 2
        • tawnycase
          tawnycase last edited by

          Hey there! Tawny from Moz's Help Team here.

          You'll want to add a robots.txt file for that subdomain, and then add a Disallow command to that robots.txt file. So, using your example, you'd want a file like mediabank.mywebsite.org/robots.txt that had a Disallow command for any robots you don't want crawling that subdomain.

          For all user-agents, that would look something like this:

          User-agent: *
          Disallow: /

          That would stop any user-agents from crawling any pages on that subdomain. 🙂

          I hope this helps! If you've still got questions, feel free to send us a note at help@moz.com and we'll do our best to sort things out for you.

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post
          • How to find duplicate content url's associate pages?
            hellothere77
            hellothere77
            0
            4
            47

          • Why do I have so many site crawl issues with my site?
            ThridHour
            ThridHour
            0
            3
            64

          • Moz site crawl showing duplicate page titles but webmaster tools doesn't
            andgee28
            andgee28
            0
            4
            130

          • Moz On-Page Grader doesn't pick up my Title, URL, Meta, H1, Body, IMG ALT's....does this mean Google won't?
            RocketStats
            RocketStats
            0
            3
            144

          • Does anyone else have issues with Moz's keyword search volume tool for Google's search engine?
            ShokIdeaGroup
            ShokIdeaGroup
            1
            5
            132

          • Site crawl errors - download list of all urls
            David-Kley
            David-Kley
            0
            4
            297

          • "Sorry! We weren't able to find that page when we crawled your site." Please help!
            Cyrus-Shepard
            Cyrus-Shepard
            0
            10
            714

          • Why isn't seo moz properly crawling my site?
            FedeEinhorn
            FedeEinhorn
            0
            5
            225

          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