Правильный robots.txt для Drupal 9

21.04.2015
Вариант реализации файла robots.txt от 25.06.2021 г. Файл robots.txt настроен для уменьшения числа дублей страниц и ориентирован на сайты Drupal, которые предоставляют для поисковой системы в качестве основных URL - ЧПУ ссылки.
Правильный robots.txt для Drupal

#
# robots.txt
#

User-agent: *
# Разрешаем все CSS, JS, Images
Allow: /core/*.css$
Allow: /core/*.css?
Allow: /core/*.js$
Allow: /core/*.js?
Allow: /core/*.gif
Allow: /core/*.jpg
Allow: /core/*.jpeg
Allow: /core/*.png
Allow: /core/*.svg
Allow: /core/*.webp
Allow: /profiles/*.css$
Allow: /profiles/*.css?
Allow: /profiles/*.js$
Allow: /profiles/*.js?
Allow: /profiles/*.gif
Allow: /profiles/*.jpg
Allow: /profiles/*.jpeg
Allow: /profiles/*.png
Allow: /profiles/*.svg
Allow: /profiles/*.webp
Allow: /libraries/*.css$
Allow: /libraries/*.css?
Allow: /libraries/*.js$
Allow: /libraries/*.js?
Allow: /libraries/*.gif
Allow: /libraries/*.jpg
Allow: /libraries/*.jpeg
Allow: /libraries/*.png
Allow: /libraries/*.svg
Allow: /libraries/*.webp
Allow: /modules/*.css$
Allow: /modules/*.css?
Allow: /modules/*.js$
Allow: /modules/*.js?
Allow: /modules/*.gif
Allow: /modules/*.jpg
Allow: /modules/*.jpeg
Allow: /modules/*.png
Allow: /modules/*.svg
Allow: /modules/*.webp
Allow: /themes/*.css$
Allow: /themes/*.css?
Allow: /themes/*.js$
Allow: /themes/*.js?
Allow: /themes/*.gif
Allow: /themes/*.jpg
Allow: /themes/*.jpeg
Allow: /themes/*.png
Allow: /themes/*.svg
Allow: /themes/*.webp
# Разрешаем индексацию минифицированных файлов скриптов
# и изображений-стилей в папке files
Allow: /sites/default/files/*.css$
Allow: /sites/default/files/*.css?
Allow: /sites/default/files/*.js$
Allow: /sites/default/files/*.js?
Allow: /sites/default/files/*.gif$
Allow: /sites/default/files/*.gif?
Allow: /sites/default/files/*.jpg$
Allow: /sites/default/files/*.jpg?
Allow: /sites/default/files/*.jpeg$
Allow: /sites/default/files/*.jpeg?
Allow: /sites/default/files/*.png$
Allow: /sites/default/files/*.png?
Allow: /sites/default/files/*.svg$
Allow: /sites/default/files/*.svg?
Allow: /sites/default/files/*.webp$
Allow: /sites/default/files/*.webp?
# Запрещаем директории
Disallow: /core*$
Disallow: /profiles*$
Disallow: /libraries*$
Disallow: /modules*$
Disallow: /themes*$
Disallow: /*node_modules*$
# Запрещаем файлы
Disallow: /README.txt
Disallow: /INSTALL.txt
Disallow: /web.config
Disallow: /update.php
Disallow: /index.php*$
Disallow: /cron.php
Disallow: /*.php$
Disallow: /*.yml$
Disallow: /*.po$
Disallow: /*.theme$
Disallow: /*.md$
Disallow: /*.module$
Disallow: /*.install$
Disallow: /*.twig$
Disallow: /*.gitignore$
Disallow: /*.git
# Запрещаем пути (чистые URLs)
Disallow: /admin*$
Disallow: /filter*$
Disallow: /search*$
Disallow: /user*$
Disallow: /login*$
Disallow: /register*$
Disallow: /reset-password*$
Disallow: /taxonomy*$
Disallow: /comment*$
Disallow: /node*$
# Пагинация и дубли страниц
Allow: /*?page=
Disallow: /*?page=0
Disallow: /*%
Disallow: /*&
Disallow: /*?

User-agent: Googlebot-Image
Allow: /*.gif
Allow: /*.jpg
Allow: /*.jpeg
Allow: /*.png
Allow: /*.svg
Allow: /*.webp

User-agent: YandexImages
Allow: /*.gif
Allow: /*.jpg
Allow: /*.jpeg
Allow: /*.png
Allow: /*.svg
Allow: /*.webp

User-agent: Mediapartners-Google
Allow: /

User-agent: YaDirectBot
Allow: /

# Очищаем UTM метки
Clean-param: utm_source&utm_medium&utm_campaign&utm_term&utm_content&calltouch_tm&roistat&roistat_referrer&roistat_pos&admitad_uid

На нашем сайте filinkov.ru мы используем cookie. Примите нашу Политику использования cookie.
Принимаю