How do I disallow crawl on a directory when it's a prefix to my site's URL?
-
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!
-
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.
-
Hi,
Please check this old thread on the same topic @ https://moz.com/community/q/block-an-entire-subdomain-with-robots-txt
Thanks
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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.
Related Questions
-
Moz can't crawl my new website?
We had a new website go live at the end of April - I keep requesting crawl tests but I get this in the excel copy... URL Title Tag
Moz Bar | | RayflexGroup
http://www.pvc-strip.co.uk 602 : Page redirects to a URL outside the scope of this campaign. I always list the website as https://... but the crawl always returns the http:// version. Not sure what I can do to make sure the website can be crawled?0 -
Why doesn't the Keyword Explorer "Explore By Site" work?
Whatever page/domain url I put in here, I get a message coming up saying ""Getting rankings counts failed" Why does his happen? I can't find anything in the Help about this.
Moz Bar | | mfrgolfgti0 -
Why do I have so many site crawl issues with my site?
Hi there, Our website is www.mormonhub.com. We have many other websites that we own as well. For some reason, our website has tens of thousands of Site Crawl Issues. We have tried looking into what's causing the problem, but can't figure it out. We do use Wordpress for our website. Any help would be greatly appreciated. Thanks! wFL8I
Moz Bar | | ThridHour0 -
Sorry, but that URL is inaccessible?
Hi, I am trying to grade some pages and keywords using the "On-page grader" tool but for each URL that I try, the tool returns me a "Sorry, but that URL is inaccessible". The thing is that I have already used previously and without any problem some of these URLs. In fact, I have just realized that, while the same URL (for example: www.lacasadelaaldea.com) works in the "On-page optimization tool", it doesn't in the "On-page grader" right now. I have looked if someone could have experienced the same issue and I have found some other threads talking about it... so I have checked with my hosting provider that there is no firewall or any other thing causing this problem but they can't find anything. How do you make the call to the server? What could be happening? Thanks in advance, Juan
Moz Bar | | lcdla0 -
How do you block keywords in On-Page Grader for certain URLs?
For the on-page grader, I rank A's for 9 keywords. I struggle with F's I have because it is searching keywords on pages that are not supposed to be searched. For example, I have a "bracelets" page, so I didn't optimize it for "rings", so I got an F. However, it graded me an A for the bracelets keyword, which is great. To be sure I am correct, each page should have it's own keyword, such as bracelet. So why is the grader checking my "Bracelets" page for "Rings"? Maybe there is something I am missing. Just trying to see why this happening.
Moz Bar | | tiffany11030 -
How do I find #of RSS Subscribers", "Most Popular Post URL", "What is the most popular post about"
Hi, I am a new user at Moz.com and looking for finding below information for a list of blogs. "#of RSS Subscribers", "Most Popular Post URL", "What is the most popular post about" for a list of blogs URLs? Please response Which tools I should use and how to use tools? -Muhammad
Moz Bar | | mmhossain4580 -
Open Site Explorer Problems
I've been checking open site explorer for months now. It doesn't show any changes in the number of root domain links to any of my pages, even though webmaster tools shows a substantial increase in root domain links for each of these urls. Open Site Explorer doesn't seem to be updating. According to Moz, my site is regularly indexed by Moz. But the numbers don't change. I've tested this on a few other sites as well with the same results. How do I get OSE to update the numbers for a particular website?
Moz Bar | | zagginc0 -
Moz just did my weekly "crawl" and claims my meta titles and descriptions are "missing," but they aren't. What's up with this?
I can check for my titles and descriptions in the source. They are there, always have been. what in the hell?
Moz Bar | | LifeisRosie0