Skip to content

Commit ed8c0fa

Browse files
committed
fix(seo): valid robots.txt syntax and trailing-slash gallery canonical
Drops the non-standard LLM-Content: directive that Lighthouse flagged as a parse error (the /llms.txt discovery path stays in place via a comment). Folds the previously orphaned Allow: lines into the User-agent: * stanza where they are semantically effective. Aligns the gallery canonical URL with Astro's trailing-slash static output to resolve 27 "Alternative page with correct canonical tag" exclusions reported in Google Search Console.
1 parent 45b34e0 commit ed8c0fa

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

public/robots.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33

44
User-agent: *
55
Allow: /
6+
Allow: /crystals/
7+
Allow: /og-images/
8+
Allow: /favicon.svg
69
Disallow: /api/
710
Disallow: /admin/
811

912
# Sitemap location
1013
Sitemap: https://gemmology.dev/sitemap-index.xml
1114

12-
# LLM crawler index (https://llmstxt.org/)
13-
LLM-Content: https://gemmology.dev/llms.txt
15+
# LLM crawler index (https://llmstxt.org/) — discoverable at /llms.txt directly.
16+
# The LLM-Content directive is non-standard for robots.txt parsers, so we
17+
# advertise the location via a comment plus the well-known /llms.txt path.
1418

1519
# Named AI-crawler stanzas.
1620
# Several AI agents (notably PerplexityBot) require an explicit Allow per
@@ -65,7 +69,3 @@ Allow: /
6569
Disallow: /api/
6670
Disallow: /admin/
6771

68-
# Static assets are explicitly allowed for all crawlers above.
69-
Allow: /crystals/
70-
Allow: /og-images/
71-
Allow: /favicon.svg

src/pages/gallery/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const initialSearch = url.searchParams.get('search') || '';
1616
const initialOrigin = url.searchParams.get('origin') || '';
1717
1818
// Always point to base gallery URL as canonical to prevent duplicate content from filters
19-
const canonicalURL = 'https://gemmology.dev/gallery';
19+
const canonicalURL = 'https://gemmology.dev/gallery/';
2020
2121
const { familyCount, expressionCount } = await getSiteStats();
2222

0 commit comments

Comments
 (0)