Hide web pages to the search engines robots

2019-08-05 05:48发布

问题:

I need to hide all my sites pages to ALL the spider robots, except for the home page (www.site.com) that should be parsed from robots.

Does anyone knows how can i do that?

回答1:

add to all pages you do not want to index tag <meta name="robots" content="noindex" />

or you can create robots.txt in your document root and put there something like:

User-agent: *
Allow: /$
Disallow: /*