Serve static robots.txt
Nginx
text
server {
...
location /robots.txt {
add_header Content-Type text/plain;
return 200 "User-agent: *\nAllow: /\nSitemap: https://example.com/sitemap.xml\n";
}
...
}
text
server {
...
location /robots.txt {
add_header Content-Type text/plain;
return 200 "User-agent: *\nAllow: /\nSitemap: https://example.com/sitemap.xml\n";
}
...
}