Last active
August 29, 2015 14:13
-
-
Save tcmorris/a6aa307d4595adeed9ab to your computer and use it in GitHub Desktop.
Pages should not show in search results, links should not be followed and images should not be indexed.
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
<!-- | |
Avoid search engines (Google, Yahoo, etc) indexing website's content | |
This method is preferred to using robots.txt, which may still cause your site to | |
show in search engine result pages even if you have set to disallow. | |
http://yoast.com/prevent-site-being-indexed/ | |
http://code.google.com/web/controlcrawlindex/docs/robots_meta_tag.html | |
http://www.youtube.com/watch?v=KBdEwpRQRD0 | |
--> | |
<!-- | |
Web.config | |
By default, pages should not be indexed e.g. dev, staging sites | |
--> | |
<httpProtocol> | |
<customHeaders> | |
<clear /> | |
<add name="X-Robots-Tag" value="noindex, nofollow, noimageindex" /> | |
</customHeaders> | |
</httpProtocol> | |
<!-- | |
Web.Production.config | |
Index pages when in production | |
--> | |
<httpProtocol> | |
<customHeaders> | |
<add name="X-Robots-Tag" xdt:Transform="Remove" xdt:Locator="Match(name)" /> | |
</customHeaders> | |
</httpProtocol> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment