Skip to content

Instantly share code, notes, and snippets.

View dtuite's full-sized avatar
🚀
Shipping

David Tuite dtuite

🚀
Shipping
View GitHub Profile
@dtuite
dtuite / README.md
Created April 11, 2014 15:21 — forked from timcheadle/README.md
Environment aware robots.txt for Rails

Make /robots.txt aware of the Rails environment

You probably don't want Google crawling your development staging app. Here's how to fix that.

$ mv public/robots.txt config/robots.production.txt
$ cp config/robots.production.txt config/robots.development.txt

Now edit config/routes.rb to add a route for /robots.txt, and add the controller code.