feat(seo): add a canonical link and a sitemap

favycon.app has no DNS records at all, so favycon.vercel.app is the only
hostname this site answers on and the canonical is unambiguous. It uses the
SITE_URL constant, so it cannot disagree with og:url.

The sitemap is a single static URL. Its loc is written without a trailing
slash to match the canonical string exactly — the two forms are the same
URL per RFC 3986, but nothing here forces them to differ, so they don't.
No lastmod: a hand-maintained file would claim a freshness it can't know.

robots.txt gains the Sitemap line and a note that /api/favycon is POST-only
and answers a GET with 405. It stays out of the disallow list deliberately:
a 405 tells a crawler more than a rule it has to fetch robots.txt to find.
This commit is contained in:
Rui Saraiva 2026-07-26 14:39:13 +01:00
parent 74275a31a7
commit 135c260189
No known key found for this signature in database
GPG Key ID: 443195C71E4EF35B
3 changed files with 15 additions and 1 deletions

View File

@ -42,6 +42,8 @@ const SEO = ({ title, description }: SEOProps) => {
<meta name="description" content={description} />
<meta name="author" content={AUTHOR.name} />
<link rel="author" href={AUTHOR.url} />
{/* favycon.app has no DNS, so vercel.app is the only hostname this answers on. */}
<link rel="canonical" href={SITE_URL} />
<link rel="apple-touch-icon" sizes="57x57" href="/favicon-57x57.png" />
<link rel="apple-touch-icon" sizes="60x60" href="/favicon-60x60.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/favicon-72x72.png" />

View File

@ -1,2 +1,8 @@
User-Agent: *
Allow: /
Allow: /
# Nothing is disallowed. /api/favycon is POST-only and answers a GET with 405,
# which is a clearer signal to a crawler than a rule it has to fetch robots.txt
# to learn. A plain-text description of the tool lives at /llms.txt
Sitemap: https://favycon.vercel.app/sitemap.xml

6
public/sitemap.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://favycon.vercel.app</loc>
</url>
</urlset>