robots.txt , , , . , , . , robots.txt .
robots.txt?
robots.txt . , . , , , , .
, robots.txt:
User-agent: , .
Disallow: .
Allow: ( , ).
Host: ( ).
Sitemap: sitemap.xml.
robots.txt
plaintext
Copy code
User-agent: *
Disallow: /admin/
Disallow: /login/
Allow: /public/
Host: wwwexample.com
Sitemap: https://www.example.com/sitemap.xml
**User-agent: *** .
Disallow: /admin/ /admin/.
Disallow: /login/ .
Allow: /public/ /public/ ( /public/ ).
Host: wwwexample.com .
Sitemap: https://www.example.com/sitemap.xml .
, , :
Host: , . , .
Crawl-delay: , , .
Crawl-delay:
plaintext
Copy code
User-agent: Yandex
Crawl-delay: 10
robots.txt . , URL, .
plaintext
Copy code
User-agent: *
Disallow: /*?session_id=
Disallow: /*?tracking_id=
URL, session_id tracking_id.
robots.txt
. .. , , .
robots.txt
:
plaintext
Copy code
User-agent: *
Disallow: /private/
Allow: /private/public-file.html
Host: wwwexample.com
Sitemap: https://www.example.com/sitemap.xml
/private/, public-file.html .
:
plaintext
Copy code
User-agent: *
Disallow:
Host: wwwexample.com
, . , , , .
robots.txt . , . , robots.txt .
, , robots.txt !