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
-
Site crawl warning - concatenated urls from Wordpress
I could use some help on how to fix this. I asked at the walkthrough but was told it was a Wordpress issue but so far I can't find anything to point me in the right direction. There are no errors in the files on server side and I have asked my hosting company too. I am hoping someone here may be able to shed some light on it. One of my websites it giving 404 errors on links that are formed as below and there are over 12.7K of them! Example: <mydomainurl>/www.instagram.com/www.instagram.com/<instagram username=""></instagram></mydomainurl> The link that relates to my website is valid and working, but I don't understand the rest. I am totally stumped on how to move forward with this. Any advice, suggestions, tips on how to fix these errors and stop these types of links getting generated. Thanks.
Moz Bar | | emercarr0 -
I can't login to the Mozbar in Chrome. Just takes me to the homepage?
So, every time I press log in on the Mozbar, it takes me to the Moz home page which I'm already logged in to but there is no change on the status of the Mozbar? What should I do to remedy this? Thanks!
Moz Bar | | soapmed5 -
4XX client error with email address in URL
I have an unusual situation I have never seen before and I did not set up the server for this client. The 4XX error is a string of about 74 URLs similar to this: http://www.websitename.com/about-us/info@websitename.com I will be contacting the server host as well to troubleshoot this issue. Any ideas? Thanks
Moz Bar | | EliteVenu0 -
My crawl report only shows 1 link
Hello, I've tried a crawl for the site www.doctify.co.uk and it's only returned 1 link in the report which is the homepage. Do you know what the issue could be? Thanks, Nina
Moz Bar | | Global_Blue0 -
Www.site.com linking to pages www10.site.com
The root domain of the website in question is www.site.com but all subpages are on the subdomain www10.site.com (I'm pretty sure it's a subdomain, at least, used for load balancing?). A funny thing happens on this site with the moz toolbar. I visit a subpage, www10.site.com/articles/articletopic1 That page has a lot of links on it, all of them visibly going to the subdomain www10.site.com. However, the moz toolbar shows some of them as Internal links and most of them as External links. As far as I can tell, there is no real rhyme or reason to the difference between the links that are highlighted as Internal vs. External. The link structures vary greatly: Some are properly structured www10.site.com/blogs/category
Moz Bar | | Motava
And some are poor like www10.site.com/articles/show_articles.php?section=category1 So a couple questions here: Does this subdomain www10 have a detriment on the rankings of subpages?
What could possibly cause the internal links on these subpages to be highlighted as external pages with the moz toolbar?1 -
How Can I intreptret The Crawl Report Resulst?
Hello, I am new to Moz and I have received 2 crawl reports. The first one was ok. I made a few changes to my site plugins, and my next crawl report came up with 41 4XX errors. Basically, a lot of my posts. I went back to my plugins and saw the following plugins: 404 redirect plugin & Utlimate Tiny MCE I reactivated both. I am presuming that these must have caused the issues or maybe my site was hacked. I re ran a crawl this morning, but I don't know what the different headings mean or how to understand the report. Can anyone advise? My site is new and just started to go up the rankings...so quite disappointed with this set back. regards Chriss
Moz Bar | | chrisspell0 -
How can the Moz Page Grader support a 'keyword portfolio' approach?
I used to use the Page Grader tools to support the old philosophy of one page - one keyword. With more focus now being given to a portfolio of keywords around a topic area - what would be a good approach to using the page grader tool? Obviously getting A's and B's is impossible for multiple keywords. The only way i've seen suggested in moz tools to help with keyword portfolios is to use labels in the ranking measurement and then find averages of the results. Are there other strategies that I can try?
Moz Bar | | AISFM0 -
Moz crawl suddenly shows much less pages from what I really have
Hi! Moz crawl suddenly shows much less pages from what I really have and from what they used to show after completing the crawl. Should I be worried? What could that be? Regards, Yossey
Moz Bar | | Joseph-Green-SEO1