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

          • I have too many tittle tag issue for my site on moz site crawl error
            Vanderlindemedia
            Vanderlindemedia
            0
            2
            33

          • Site crawl warning - concatenated urls from Wordpress
            emercarr
            emercarr
            0
            4
            77

          • 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

          • Why RogerBot can't crawl site https://unplag.com
            Targeras
            Targeras
            0
            10
            540

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

          • When attempting to crawl my site, I'm getting the error: Oops! That URL doesn’t resolve, which means your report will be blank. Please fix the issue or change the URL. What's going on here?
            KeriMorgret
            KeriMorgret
            0
            4
            305

          • Moz just did my weekly "crawl" and claims my meta titles and descriptions are "missing," but they aren't. What's up with this?
            LifeisRosie
            LifeisRosie
            0
            3
            132

          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