F
F
Franco Mannino2016-12-21 09:10:53
htaccess
Franco Mannino, 2016-12-21 09:10:53

How to close a directory containing folders with websites from robots?

How to close a directory containing folders with websites from robots?
For example, this is possible through .htaccess - they tell me that Apache reads it, but Apache does not see the directory higher than the sites.
What other ways are there?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VVB, 2016-12-21
@garinov

put robots.txt in the root of the site
Add after the main parameters, before the sitemap and host (if you have them)
- if you want to individually disable some sites from indexing
Disallow: /projects/site1/
Disallow: /projects/site2/
- if you want all disallow folder to be indexed
Disallow: /projects/
Note the "/" at the end of the line.
If projects have already been indexed, they can be deleted in GSC (Google Search Console)
Google Index -> Remove URLs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question