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 [email protected] and we'll do our best to sort things out for you.
-
Hi,
Please check this old thread on the same topic @ https://mza.seotoolninja.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
-
What data we don't get from link explorer that we can get if we add a campaign?
I was wondering what's the difference between campaign data and link explorer data, both in pro version of moz? What are the features we get by adding campaign that we don't get via link explorer?
Moz Bar | | HuptechWebseo0 -
Moz Crawl only crawling the top level page (1 page)
For the past few mounts my weekly site crawl has been inconsistent. One week works fine, it crawls all of my 500 or so pages. The following week it only crawls 1 page (http://mydomain.com) and nothing else. A few weekly scan go by and the crawl is back up the the 500 or so pages.I went ahead and created several campaigns with duplicate settings and crawled the site. Most times but not all the new campaign's crawl works fine crawling all pages. But within a week or two the weekly crawl will fail again. (crawling 1 page). Currently i have four campaign's all with the same settings running weekly crawls. 2 campaign's crawled the 500 pages and two crawled only the single page. Any help will be greatly appreciated
Moz Bar | | dmaude0 -
On-Page Grader "Sorry, but that URL is inaccessible."
We have a new client with a squarespace page. http://www.mountainhouseestate.com The Moz On-Page grader returns the error "Sorry, but that URL is inaccessible." for all pages. Possibly related, Google seems to hate their site. Even a search for "mountain house estate" returns lousy results. Bing/Yahoo has no problem with it.
Moz Bar | | Duke_Ferris1 -
Keyword Difficulty Search Results: Can't tell which search engine
I ran a keyword difficulty search for 4 search engines: Switzerland in Italian, Switzerland in English, Switzerland in French and Switzerland in German. Now the results are in but it shows "Google.ch" for all of them so I can't tell which result is for which language. How can I check that? I ran the basic not full SERP.
Moz Bar | | WagMoreBarkLess0 -
Crawl Report Internal Links Count
We recently ran a crawl report on www.phase1tech.com. Some of the pages are coming back with a large amount of 'internal links'. These 2 pages for example are showing 800 internal links: http://www.phase1tech.com/Upcoming-Events
Moz Bar | | AISEO
http://www.phase1tech.com/Contact At best there are approximately 70 links on the page. Where is the 800 number coming from?0 -
MOZ crawl test is not reporting on all the pages on my site.
I've run the crawl test one of the sites I've taken over SEO for, however its only picking all the pages. For instance it indexes all the pages under xxxxx/us but none under xxxxx/au or xxxxx/uk The pages are being indexed as they're ranking in Google. Thanks.
Moz Bar | | ahyde0 -
Rank Checker Won't Accept New gTLDs
Hi everyone, I've got some domains with extension** .solutions** however, these extensions are not yet accepted by some of the very useful, and now dearly missed tools on this site. One of those tools is the Rank Checker: error message TDanTx1.png
Moz Bar | | SSsseeeooOO0 -
Mozscape Update-Why every site is down?
Every site,every competitors site have been down.What type of data Moz used this time to update the index. If the variables are changed can I have the priority variables?
Moz Bar | | csfarnsworth1