NixOS / nix.dev

Official documentation for getting things done with Nix.
https://nix.dev
Creative Commons Attribution Share Alike 4.0 International
2.26k stars 238 forks source link

[SEO] Duplication #1010

Open roberth opened 1 week ago

roberth commented 1 week ago

Observations

The Nix manual allows .html extensions.

https://nix.dev/manual/nix/2.23/language/derivations https://nix.dev/manual/nix/2.23/language/derivations.html

This means that all pages are duplicated.

Even more duplication exists between versions.

Problem Duplicate pages are bad for search engine optimization (SEO).

Approaches

Add redirects, e.g. from x.html to x. HTTP resources don't need file extensions and should not have them. HTML is not a relevant keyword, so it should not appear in our URLs.

Another option is to add headers or meta tags that tell crawlers which page is the canonical page, but this would be over-engineered for this problem. This would be over-engineered for .html, but afaik it's the only option for telling crawlers where to find the latest and not punish us in their rankings.

Willing to help?

Yes.

Priorities

Add :+1: to issues you find important.

fricklerhandwerk commented 1 week ago

We can't add such generic redirects without full control of the web server, and Netlify is too dumb for that. Adding canonical locations in meta seems like the most achievable path, but would need to be done as a somewhat expensive post-processing step.