diff --git a/Caddyfile b/Caddyfile index 4878da5..b8bab8a 100644 --- a/Caddyfile +++ b/Caddyfile @@ -13,9 +13,18 @@ } handle_path /api/* { - reverse_proxy * portfolio-backend:3001 reverse_proxy * backend:3001 } + + @robots { + method GET + path /robots.txt + path /sitemap.xml + } + handle @robots { + file_server { + root /app/robots/ + } } handle * { diff --git a/robots/robots.txt b/robots/robots.txt new file mode 100644 index 0000000..73d2eea --- /dev/null +++ b/robots/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://www.example.com/sitemap.xml diff --git a/robots/sitemap.xml b/robots/sitemap.xml new file mode 100644 index 0000000..625cac3 --- /dev/null +++ b/robots/sitemap.xml @@ -0,0 +1,7 @@ + + + + https://www.example.com/index.html + 2023-03-14 + +