Difference between links with different case

烂漫一生 提交于 2019-12-25 15:25:22

问题


How does Google view links with all uppercase?

Is this the same for Google:

example.net/LogIn.html

example.net/LOGIN.html

example.net/login.html

I need to redesign an old site with uppercase on links, but I don't want to lose Google rank.


回答1:


HTTP URL paths are case-sensitive.

Live example: The following two URLs only differ in O vs. o and they lead to different pages:

  • https://en.wikipedia.org/wiki/Stack_Overflow
  • https://en.wikipedia.org/wiki/Stack_overflow

So the first assumption of every conforming consumer should be that /LogIn.html, /LOGIN.html, and /login.html could lead to different resources.

Consumers might use various signals to decide if that’s really the case or if the server simply accepts any case (e.g., by detecting duplicate content). But if you have such a server, you would ideally use 301 redirects to point to the canonical variant, or, if that’s not possible, the canonical link type (you might also want to use this one in addition to the redirect).



来源:https://stackoverflow.com/questions/36747184/difference-between-links-with-different-case

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!