RGJ
(Richard - Communiteq)
Maio 18, 2021, 7:43pm
1
It seems like URL’s to user profiles are not case sensitive.
For instance https://meta.discourse.org/u/DiscObOt works just as well as https://meta.discourse.org/u/discobot
But the canonical URL in the first variation is not canonicalized into the ‘official’ case of the username, possibly leading to duplicate content issues or the wrong variation being indexed.
So the canonical URL of the first variation is:
<link rel="canonical" href="https://meta.discourse.org/u/DiscObOt" />
while it should be
<link rel="canonical" href="https://meta.discourse.org/u/discobot" />
leading to the ‘correctly’ spelled variant.
6 curtidas
Hmm is this an issue in practice?
1 curtida
sam
(Sam Saffron)
Maio 20, 2021, 5:40am
3
I don’t think it is … but it is kind of odd that we allow:
https://meta.discourse.org/u/codinghorror
https://meta.discourse.org/u/codinghorrOr
https://meta.discourse.org/u/cOdinghorror
We should normalize the username to lowercase username and force a redirect for the various obscure mis-cased usages similar to how we normalize topic urls / category urls.
I guess the same normalization should hold for https://meta.discourse.org/g/Admins
We already perform normalization using a redirect for https://meta.discourse.org/c/Bug/1/l/unread and https://meta.discourse.org/t/incorrect-canonical-url-for-user-profile-PAGE/190847
Low priority but we should clean this up.
Changing this to feature though cause nothing is really broken, it is just odd and inconsistent.
4 curtidas
Sure perhaps @andrei could add to his list? this one seems easy and high reward for low risk?
2 curtidas
andrei
(Andrei Prigorshnev)
Maio 20, 2021, 6:59pm
5
I’m adding this to my list with low priority.
3 curtidas
stance455
(Nader)
Fevereiro 6, 2023, 9:59pm
7
Também sou a favor de limpar isso..
Você também notará que cada uma dessas URLs tem um canônico diferente apontando para si mesmo. (@RGJ já mencionou isso)
Correto, imagino que deva ser o mesmo para as URLs de usuário, ou pelo menos ter todas essas URLs compartilhando o mesmo canônico.
stance455
(Nader)
Fevereiro 18, 2023, 10:06pm
8
Gostaria também de acrescentar que os URLs de tags também apresentam um comportamento semelhante.
Ou seja, os URLs de tags não são “normalizados quanto a maiúsculas/minúsculas” (se essa for a terminologia correta).
Portanto, ambos
https://meta.discourse.org/tag/Official
e
https://meta.discourse.org/tag/official
levam ao mesmo lugar, mas têm canônicos autorreferenciais em vez de apenas a versão em minúsculas.
1 curtida