-
-
Save dotrungquan/b471ae94792b3c895879fb5c401db8cc to your computer and use it in GitHub Desktop.
Server config rules for set X-Robot-Tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For Apache, Litespeed | |
<Files ~ "\.(pdf|doc|docx|xls|xlsx|ppt|pptx)$"> | |
Header set X-Robots-Tag "noindex, nofollow" | |
</Files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nginx domain config | |
# example path: /etc/nginx/conf.d/domain.com.conf | |
server { | |
# Set X-Robots-Tag cho các file văn bản | |
location ~* \.(pdf|docx|doc|xls|xlsx|ppt|pptx)$ { | |
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment