-
-
Save HighBreedTech/f28968725d41f76668ff9c3e7d3b15be to your computer and use it in GitHub Desktop.
htaccess: Disable URL indexing by crawlers (FOR DEVELOPMENT/STAGE)
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
# ----------------------------------------------------------------------------------------- | |
# Disable URL indexing by crawlers (FOR DEVELOPMENT/STAGE) | |
# ----------------------------------------------------------------------------------------- | |
# Avoid search engines (Google, Yahoo, etc) indexing website's content | |
# http://yoast.com/prevent-site-being-indexed/ | |
# http://code.google.com/web/controlcrawlindex/docs/robots_meta_tag.html | |
# Matt Cutt (from Google Webmaster Central) on this topic: | |
# http://www.youtube.com/watch?v=KBdEwpRQRD0 | |
# IMPORTANT: serving this headers is recommended only for | |
# development/stage websites (or for live websites that don't | |
# want to be indexed). This will avoid the website | |
# being indexed in SERPs (search engines result pages). | |
# This is a better approach than using robots.txt | |
# to disallow the SE robots crawling your website, | |
# because disallowing the robots doesn't exactly | |
# mean that your website won't get indexed (read links above). | |
# https://github.com/h5bp/html5-boilerplate/issues/804 | |
# <IfModule mod_headers.c> | |
# Header set X-Robots-Tag "noindex, nofollow, noarchive" | |
# <FilesMatch "\.(doc|pdf|png|jpe?g|gif)$"> | |
# Header set X-Robots-Tag "noindex, noarchive, nosnippet" | |
# </FilesMatch> | |
# </IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment