GAE does not serve my robots.txt

In my app.yaml app the following is stated:

handlers: - url: /favicon.ico static_files: img/favicon.ico upload: noop - url: /apple-touch-icon.png static_files: img/apple-touch-icon.png upload: noop - url: /images static_dir: img - url: /robots.txt static_files: media/robots.txt upload: noop - url: /humans.txt static_files: media/humans.txt upload: noop 

/humans.txt are other mappings after the declaration for /humans.txt , but I will shorten them for brevity.

The noop directory is an empty directory.

However, my browser gives me 404 when I try to access these URLs:

Why?

+4
source share
1 answer

Since you are using static files, the download should match the location of static_files:

 - url: /robots.txt static_files: media/robots.txt upload: media/robots.txt - url: /humans.txt static_files: media/humans.txt upload: media/humans.txt 
+10
source

Source: https://habr.com/ru/post/1347419/


All Articles