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

Any real benefit from using a subdomain vs a folder vs just a page name?

· 52CE 我爱测

Besides the SEO issues, are there any legit long term benefits from having one type of URL vs the other from the following list: example.com/learning-how-to-fish.html - Page name only learning.example.com/fishing.html - Sub-domai…

问题原文

原帖链接 · Tony DiNitto · CC BY-SA 3.0

Besides the SEO issues, are there any legit long term benefits from having one type of URL vs the other from the following list:

example.com/learning-how-to-fish.html - Page name only

learning.example.com/fishing.html - Sub-domain

example.com/learning/how-to-fish.html - Folder use

Google's policies on trivial things link this seem to change often, which makes me only slightly interested in the SEO perspective. But is there any other good reason of one vs the next? I've seen info on using subdomains, but it's all several years old and usually only compares them to folders instead of the other option, which is to not use folders at all.

已采纳解答

原帖链接 · George G · CC BY-SA 3.0

I want to mention some factors that may help better decide what you need and be comfortable with it.

When I started my website I had same kind of dilemma (you want everything to be ideally organized), so now I'll explain how my taste changed toward this:

First I liked the idea to split different subjects on subdomains like:

  • users.site.com
  • poets.site.com
  • music.site.com etc..

but somehow there may be some trouble managing subdomains (especially when using shared-hosting, they not always let you manage this kind of things as you wish), also subdomains have different system of ranking. Moving website also may have some troubles etc..

Having directory structure is nice, I used this too and I love it, but some says that you should not go too deep with it and it's better to have 2 or max 3 branches (for readability, for seo and just to be flexible).

Having extensions is redundant like: .html. I started with .htm because I liked that idea, every page was able to download pdf and doc versions and in my url I would just change extension for different that purpose:

  • site.com/poets/poems/poem-name.htm
  • site.com/poets/poems/poem-name.pdf

like that, I liked that first time but next I thought it was redundant for .htm and would make url a bit less readable. but it's matter of taste.

Finally I prefered: site.com/poets/poems/dsa-poem-name

What about dsa I created number masking tool with letters using all the latin alphabet symbols, doing is good for some reason, even long ids look smaller in size. I mean having ids in url is good for some reason: if you somehow misspell the words in your url you can change later and do 301 redirects by depending on id, for example:

  • if u had ../dsa-poem-neme and change later with ../dsa-poem-name the url ../dsa-poem-neme will still work by redirecting to correct form, and you identify entry by converting dsa in number ex: 13412, and check if urls does not match redirect to correct one, without showing the 404 (this case you don't lose users visiting old version of incorrect urls).

most use ids itself but it does not look nice for eyes with my opinion, and letter better fit in.

So finally I recommend to do:

  • folder structure, with 2 or 3 max branches
  • having identifier in url (at the beginning or at the end of it)
  • don't use redundant fake file extensions like: .html
  • extra tip: don't allow slashes at the end of url like: ../dsa-poem-name/, it's more beautiful without it.

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

资料来源与适用范围

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

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

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