Skip to content

site: robots.txt, sitemap, 404 page, canonical links, HSTS - #778

Merged
w1ne merged 1 commit into
developfrom
seo/crawl-basics
Sep 27, 2026
Merged

w1ne merged 1 commit into
developfrom
seo/crawl-basics

Conversation

@w1ne

@w1ne w1ne commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Fixes SEO faults on kernelcad.com.

  • /robots.txt and /sitemap.xml now exist. Before, both returned the home page.
  • site/404.html makes Cloudflare Pages return 404 for unknown paths. Before, every unknown path returned the home page with 200.
  • Each page has a canonical link. Generated docs pages get one from build-docs.ts (test added). Pages serves x.html at /x, so the canonical uses /x.
  • og:url is https://kernelcad.com/.
  • /app/connect redirects (301) to https://app.kernelcad.com/connect. This site has no page at that path, so it served a copy of the home page. With the 404 fix it would return 404.
  • HSTS header, max-age=31536000, no includeSubDomains.

robots.txt and sitemap.xml are real files in site/, so they need no _redirects line. _redirects has no catch-all rule; the old fallback came from the missing 404 page.

The sitemap lists /, /docs/, /terms, /privacy. The 13 docs pages are generated and linked from /docs/; I did not hard-code them.

Not deployed. kernelcad.com deploys from kernelCAD-server deploy-kernelcad-com.yml.

- Add site/robots.txt and site/sitemap.xml.
- Add site/404.html. Cloudflare Pages then returns 404 for unknown
  paths instead of the home page.
- Add a canonical link to each page, and to each generated docs page.
  The canonical is the extensionless URL that Pages serves with 200.
- Set og:url to https://kernelcad.com/.
- Redirect /app/connect to https://app.kernelcad.com/connect. The path
  had no page here and served a copy of the home page.
- Add Strict-Transport-Security to site/_headers.
@w1ne
w1ne merged commit 0c86dce into develop Sep 27, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant