I want to block search bots in crawling all my website's pages expect for homepage. Is this rule correct?
-
User-agent: *
Disallow: /*
-
-
Thanks Matt! I will surely test this one.
-
Thanks David! Will try this one.
-
Use this:
User-agent: Googlebot
Noindex: /User-agent: Googlebot
Disallow: /User-agent: *
Disallow: /This is what I use to block our dev sites from being indexed and we've had no issues.
-
Actually, there are two regex that Robots can handle - asterisk and $.
You should test this one. I think it will work (about 95% sure - tested in WMT quickly):
User-agent: *
Disallow: /
Allow: /$ -
I don't think that will work. Robots.txt doesn't handle regular expressions. You will have to explicitly list all of the folders, and files to be super sure, that nothing is indexed unless you want it to be found.
This is kind of an odd question. I haven't thought about something like this in a while. I usually want everything but a couple folders indexed. : ) I found something that may be a little more help. Try reading this.
If you're working with extensions, you can use **Disallow:/*.html$ **or php or what have you. That may get you closer to a solution.
Definitely test this with a crawler that obeys robots.txt.
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
-
Will google be able to crawl all of the pages given that the pages displayed or the info on a page varies according to the city of a user?
So the website I am working for asks for a location before displaying the product pages. There are two cities with multiple warehouses. Based on the users' location, the product pages available in the warehouse serving only in that area are shown. If the user skips location, default warehouse-related product pages are shown. The APIs are all location-based.
Intermediate & Advanced SEO | | Airlift0 -
How long will old pages stay in Google's cache index. We have a new site that is two months old but we are seeing old pages even though we used 301 redirects.
Two months ago we launched a new website (same domain) and implemented 301 re-directs for all of the pages. Two months later we are still seeing old pages in Google's cache index. So how long should I tell the client this should take for them all to be removed in search?
Intermediate & Advanced SEO | | Liamis0 -
Our client's web property recently switched over to secure pages (https) however there non secure pages (http) are still being indexed in Google. Should we request in GWMT to have the non secure pages deindexed?
Our client recently switched over to https via new SSL. They have also implemented rel canonicals for most of their internal webpages (that point to the https). However many of their non secure webpages are still being indexed by Google. We have access to their GWMT for both the secure and non secure pages.
Intermediate & Advanced SEO | | RosemaryB
Should we just let Google figure out what to do with the non secure pages? We would like to setup 301 redirects from the old non secure pages to the new secure pages, but were not sure if this is going to happen. We thought about requesting in GWMT for Google to remove the non secure pages. However we felt this was pretty drastic. Any recommendations would be much appreciated.0 -
'Nofollow' footer links from another site, are they 'bad' links?
Hi everyone,
Intermediate & Advanced SEO | | romanbond
one of my sites has about 1000 'nofollow' links from the footer of another of my sites. Are these in any way hurtful? Any help appreciated..0 -
Where's all the text?
Hi, We recently (yesterday) had a developer make a new site for us on Wix http://www.appointeddhq.com/ as the one we were planning to put up had a few teething issues (the beackend booking system wasn't ready and we needed something up immediately for a TV show we were being featured in). Having now had the chance to look through it, I'm not quite sure what's going on. None of the text appears to be there on any page, I can't find any of the descriptions we gave the developer, the alt tags behind pictures (and even the pics themselves) don't appear to be there, the URLs are messed up, titles are incorrect and there are no title tags to be found. Am I misunderstanding or is the whole site built in java? Obviously, this is quite a huge issue and I'll want to get it sorted immediately, but I thought it best to see what the good folks here though. Thanks!
Intermediate & Advanced SEO | | LeahHutcheon0 -
The SEO effect of adding a front page to a website?
I have a client that wants to add a front page to a website so that when a user visitors the site for the first time a full page advert/message/page appears before they enter the site. The client wants this to be cookie controlled so they only see this on the first visit to the website. I am concerned that even if I put links to a sitemap or xml sitemap on this page that it will affect how well the site performs in search engines. Any ideas/suggestions or experiences? I found an interesting page on Quora about using pop ups.... Anyone who comments can you link to some good research and a clear simple explanation I can use to explain to the client why this is a bad idea..... https://www.quora.com/Search-Engine-Optimization-SEO/How-would-a-pop-up-ad-on-a-websites-home-page-affect-SEO And for the record I tried the usability argument....
Intermediate & Advanced SEO | | JohnW-UK0 -
OOPS!! My website links the most to me, I can't get it??
Today, I have checked Google webmaster tools to get answer of following question. Who links the most to my website? I was assumed that Google webmaster tools provide me list of external website where I have created my text links. But, I can't get it when see my own website links the most to me. (4652??) I checked my other websites which are integrated in Google webmaster tools. They also developed on same platform as well as same internal linking structure. But, I am not able to find out similar issue over there. That's why I am quite confuse with Vista Store. How can I solve it? Does it really matter? "Open Site Explorer is my favorite one and always using that to get it done. But, Google webmaster tools is also active & free so why should I not jump in to... 🙂 "
Intermediate & Advanced SEO | | CommercePundit0 -
Block all search results (dynamic) in robots.txt?
I know that google does not want to index "search result" pages for a lot of reasons (dup content, dynamic urls, blah blah). I recently optimized the entire IA of my sites to have search friendly urls, whcih includes search result pages. So, my search result pages changed from: /search?12345&productblue=true&id789 to /product/search/blue_widgets/womens/large As a result, google started indexing these pages thinking they were static (no opposition from me :)), but i started getting WMT messages saying they are finding a "high number of urls being indexed" on these sites. Should I just block them altogether, or let it work itself out?
Intermediate & Advanced SEO | | rhutchings0