2018-04-11 18:00:15 -04:00
|
|
|
# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
|
|
|
<% if Discourse.base_uri.present? %>
|
|
|
|
# This robots.txt file is not used. Please append the content below in the robots.txt file located at the root
|
|
|
|
<% end %>
|
2013-02-05 14:16:51 -05:00
|
|
|
#
|
2018-03-15 17:10:45 -04:00
|
|
|
<% @allowed_user_agents.each do |user_agent| %>
|
|
|
|
User-agent: <%= user_agent %>
|
|
|
|
<% end %>
|
2018-04-11 16:05:02 -04:00
|
|
|
<% RobotsTxtController::DISALLOWED_PATHS.each do |path| %>
|
|
|
|
Disallow: <%= Discourse.base_uri + path %>
|
|
|
|
<% end %>
|
2017-02-13 07:01:10 -05:00
|
|
|
|
2018-03-15 17:10:45 -04:00
|
|
|
<% if @disallowed_user_agents %>
|
|
|
|
<% @disallowed_user_agents.each do |user_agent| %>
|
|
|
|
User-agent: <%= user_agent %>
|
2018-04-11 16:05:02 -04:00
|
|
|
Disallow: <%= Discourse.base_uri + "/" %>
|
2018-03-15 17:10:45 -04:00
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
2017-02-13 07:01:10 -05:00
|
|
|
<%= server_plugin_outlet "robots_txt_index" %>
|
2018-04-05 20:15:23 -04:00
|
|
|
|
|
|
|
<% @crawler_delayed_agents.each do |agent, delay| %>
|
|
|
|
User-agent: <%= agent %>
|
|
|
|
Crawl-delay: <%= delay %>
|
|
|
|
<% end %>
|