This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added a safer default
robots.txt
template
- Loading branch information
Andrew Welch
committed
Jun 20, 2017
1 parent
104d857
commit 3dec050
Showing
3 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# robots.txt for {{ siteUrl }} | ||
# For a multi-environment setup, see: https://nystudio107.com/blog/prevent-google-from-indexing-staging-sites | ||
|
||
Sitemap: {{ siteUrl |trim('/') }}/sitemap.xml | ||
|
||
# Don't allow web crawlers to index Craft | ||
{% if craft.config.devMode %} | ||
# devMode - disallow all | ||
|
||
User-agent: * | ||
Disallow: / | ||
{% else %} | ||
# Live - Don't allow web crawlers to index Craft | ||
|
||
User-agent: * | ||
Disallow: /craft/ | ||
{% endif %} |