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

What are clean URLs --- What makes a URL clean?

· 52CE 我爱测

There is this terminology of "clean"/"short"/pretty" URLs. What makes a URL this way? Is it the lack of a Cname value such as www. ? Is it the lack of query string variables and their values ? Is it the lack of both? Is it the la…

问题原文

原帖链接 · timesharer · CC BY-SA 4.0

There is this terminology of "clean"/"short"/pretty" URLs.

What makes a URL this way?

  • Is it the lack of a Cname value such as www.?
  • Is it the lack of query string variables and their values?
  • Is it the lack of both?
  • Is it the lack of something totally different?

已采纳解答

原帖链接 · Jhun A. · CC BY-SA 4.0

The Cname www if it is set to be part of the base URL is OK. It depends if the website uses www or non www. But it should be consistent to avoid duplicate contents. So it would still be a clean URL with or without. Consistency is a must for SEO point of view.

Yes clean url should not contain query strings and extensions like .html, .php, etc. I remember configuring clean URL for one site before and my boss wants to remove the .html extensions.

Query strings are dynamic hence the content of page may change depending on the query. This is usual on ecommerce sites where searching of products is a vital function.

Also, it should not contain program extensions like .html , .asp , .php

Examples of clean url would be:

  • https://www.example.com
  • https://www.example.com/cars
  • https://www.example.com/cars/sports-car

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

资料来源与适用范围

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

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

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