I want to have a simple little Flask website that returns a robots.txt
. Here's what I have so far:
from flask import Flask
app = Flask(__name__)
app.run(host = "0.0.0.0", port = 80)
@app.route("/robots.txt")
def robots_dot_txt():
return "User-agent: *\nDisallow: /"
When I try to access this, I get a 404:
213.152.161.130 - -[31/Mar/2018 21:35:01] "GET /robots.txt HTTP/1.1" 404 -