Skip to content

Commit

Permalink
Apparently robots.txt is not enough if someone links to a page.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Nov 13, 2018
1 parent 6a6976a commit 6bcc1eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app.rb
Expand Up @@ -8,6 +8,10 @@

before do
content_type :text
# only allow search engine indexing of the main page
if request.path != "/"
headers({"X-Robots-Tag" => "noindex"})
end
end

get "/" do
Expand Down
1 change: 0 additions & 1 deletion public/robots.txt
@@ -1,4 +1,3 @@
User-agent: *
Allow: /$
Allow: /live$
Disallow: /

0 comments on commit 6bcc1eb

Please sign in to comment.