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

URL Character Counting - Where to start counting?

· 52CE 我爱测

I'm rewriting URLs for a website, I know it could affect SEO, but I've no choice but to rewrite them, and 301 redirect the old ones to their new URLs. I want to try to keep the new URLs short and to the point. When I'm counting t…

问题原文

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

I'm rewriting URLs for a website, I know it could affect SEO, but I've no choice but to rewrite them, and 301 redirect the old ones to their new URLs. I want to try to keep the new URLs short and to the point.

When I'm counting the total number of characters in a URL, I shouldn't include the protocol https:// in my character count, right? Should include every character including dots, hyphens, slashes etc, after the initial https:// or something else? I'm assuming I count characters like I'll show in an example below, but want to check, please.

example.com/product/shoes

Would count as a total of 25 characters, right?

已采纳解答

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

Maybe there is more to your backstory that you have omitted?

You count the number of characters in the URL by literally counting every single character in the URL. No more; no less.

I shouldn't include the protocol https:// in my character count, right?

Why not? It is part of the URL. It is also shown in the Google SERPs.

Oh, and should I could a trailing slash too like example.com/product/shoes/ would be a count of 26?

Yes, include the trailing slash too.

Also include the query string and fragment identifier - it is all part of the URL.

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

资料来源与适用范围

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

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

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