feat: add robots.txt and sitemap.xml
This commit is contained in:
parent
bd48bc87b7
commit
cd02ac87fd
3 changed files with 21 additions and 1 deletions
11
Caddyfile
11
Caddyfile
|
@ -13,9 +13,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_path /api/* {
|
handle_path /api/* {
|
||||||
reverse_proxy * portfolio-backend:3001
|
|
||||||
reverse_proxy * backend:3001
|
reverse_proxy * backend:3001
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@robots {
|
||||||
|
method GET
|
||||||
|
path /robots.txt
|
||||||
|
path /sitemap.xml
|
||||||
|
}
|
||||||
|
handle @robots {
|
||||||
|
file_server {
|
||||||
|
root /app/robots/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handle * {
|
handle * {
|
||||||
|
|
4
robots/robots.txt
Normal file
4
robots/robots.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
User-agent: *
|
||||||
|
Allow: /
|
||||||
|
|
||||||
|
Sitemap: https://www.example.com/sitemap.xml
|
7
robots/sitemap.xml
Normal file
7
robots/sitemap.xml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<url>
|
||||||
|
<loc>https://www.example.com/index.html</loc>
|
||||||
|
<lastmod>2023-03-14</lastmod>
|
||||||
|
</url>
|
||||||
|
</urlset>
|
Loading…
Add table
Reference in a new issue