大网数据广告活动
网站运营与故障问答

Should my URLs be lowercase?

· 52CE 我爱测

According to Understanding SEO Friendly URL Syntax Practices I should change http://example.com/Hello-Dolly To http://example.com/hello-dolly The reasons given are: URLs, in general, are case-sensitive it will simplify any case s…

问题原文

原帖链接 · Rowan Freeman · CC BY-SA 4.0

According to Understanding SEO Friendly URL Syntax Practices I should change

http://example.com/Hello-Dolly

To

http://example.com/hello-dolly

The reasons given are:

  • URLs, in general, are case-sensitive
  • it will simplify any case sensitive SEO and analytics reports

According to this GIF that I found on Wikipedia's article on URL Normalization I should convert my URLs from any uppercase to all lowercase.

However I use ASP.NET MVC and by default my URLs are (PascalCase):

http://www.example.com/Controller/Action/Parameter

http://www.example.com/Categories/List/Bicycles

I've skimmed through the RFC1738 but I didn't see any definitive answers to this.

Should I go out of my way to force the framework to change everything to lower case? Why did Microsoft choose to design their framework like this if everybody is telling me to use lowercase?

已采纳解答

原帖链接 · dan · CC BY-SA 3.0

Should I go out of my way to force the framework to change everything to lower case?

No, that's not necessary. Windows operating systems are case insensitive, including their server OS's and framework applications. Linux/Unix operating systems are however case sensitive.

Internet-based applications (e.g., browsers) should normalize URL's, as covered in section 6 of RFC 3986:

One of the most common operations on URIs is simple comparison: determining whether two URIs are equivalent without using the URIs to access their respective resource(s). A comparison is performed every time a response cache is accessed, a browser checks its history to color a link, or an XML parser processes tags within a namespace. Extensive normalization prior to comparison of URIs is often used by spiders and indexing engines to prune a search space or to reduce duplication of request actions and response storage.

Since you'll be using a Windows server no doubt, requested URLs and URIs will be returned to client applications just fine.


In regards to search engines, as stated in the RFC above, and in your Wikipedia link on URL Normalization:

Search engines employ URL normalization in order to assign importance to web pages and to reduce indexing of duplicate pages.

And as sources like this report on the subject:

More recently, Google began to better understand that /page1.html and /Page1.html were just two instances of the same content.


Why did Microsoft choose to design their framework like this if everybody is telling me to use lowercase?

It's compatible with their operating system, and technically not incorrect according to the RFC's. They also have their own way of doing things, which keeps webmasters guessing :-)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2013-08-09)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0 / CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。