ASP.NET MVC - 缩短 url
我正在开发一个国际网站 - 多个国家、多种语言。我正在尝试创建 SEO 友好的 URL。
例如,目录由笛卡尔积区域 x 类别组成。典型的目录 URL 有 7 个层次结构:
www.site.com/en/Catalog/Browse/10/28/London/Category1
路由格式如下:
"/{culture }/{controller}/{action}/{regionId}/{branchId}/{region}/{branch}"
我在某处读到,搜索引擎对站点层次结构深处的页面的相关性较低(由路径中斜杠的数量)。这是真的吗?有人知道深层网站失去多少相关性吗?
我考虑过使用“-”和“+”作为分隔符来简化 URL(使其不那么深),所以现在我有如下路由:
"/{culture}/FriendlyActionPlusControllerName/{regionId}-{ branchId}/{region}+{branch}"
最终的网址在“文件夹”层次结构中仍深 4 层。
www.site.com/en/services/10-28/London+Category1
在 URL 中使用 + 和 - 是否被视为可行的方法?这种缩短对 SEO 有帮助吗?有人看到我可以选择如何进一步简化 URL 吗?
附加说明:目录将成为搜索引擎流量的主要来源。也会有一些内容页面(带有像 www.site.com/en/Service1 这样的网址),但这两个将是唯一的搜索流量生成器,所以我希望尽可能地优化它们。
I am developing an international web site - multiple countries, multiple languages. I am trying to create SEO friendly URLs.
For example the catalog consists of cartesian product Regions x Categories. A typical catalog url has 7 levels of hierarchy:
www.site.com/en/Catalog/Browse/10/28/London/Category1
The route format is as follows:
"/{culture}/{controller}/{action}/{regionId}/{branchId}/{region}/{branch}"
I have read somewhere that search engines give less relevance to pages deep in the site hierarchy (determined by number of slashes in path). Is this true? Does anybody have info on how much relevance do deep sites lose?
I have thought about simplifying the URLs (making them less deep) by using '-' and '+' as delimiters, so now I have routes like for example:
"/{culture}/friendlyActionPlusControllerName/{regionId}-{branchId}/{region}+{branch}"
ending up with urls still 4 levels deep in "folder" hierarchy.
www.site.com/en/services/10-28/London+Category1
Is using + and - in URLs considered a viable approach? Does this kind of shortening help in SEO? Does anyone see any options for me how to further simplify the URLs?
Additional note: Catalog is going to be the main source of search engine traffic. There are going to be a few content pages as well (with urls like www.site.com/en/Service1) but these two are going to be the only search traffic generators, so I would like to have them optimized as much as possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据我的经验,我建议您使用 - (连字符)。如果您可以将连字符的数量保持在 2 或 3 个,那么这可能是安全的路线。尽管我见过超越这一点的人,但它也同样有效。
基本上,我认为如果您以纯粹描述页面内容的方式进行操作,而又不过分,那就没问题。然而,还应该注意的是,您的网址中的关键字越多,您的页面对于搜索引擎来说就越多样化。
还要记住,标题、h1、元数据中的关键字应该全部匹配,因此越多管理起来就越困难。
我意识到这并不能 100% 回答你的问题,而且会导致更多问题!
From my experience, I suggest you use the - (hyphenated). If you can keep the number of hyphens to 2 or 3, that is probably the safe route to take. Although I have seen people who go beyond that and it works just as well.
Basically I think if you do it in a way that is purely descriptive of the page content without going overboard, you're okay. However it should also be noted that the more keywords in your url's then the more diverse your page is going to be for Search Engines.
Also remember that keywords in the title, h1, meta data should all match up so the more you have the more difficult this is to manage.
I realise that this does not answer your question 100% and leads to more questions!
Codeplex上有一个开源项目在aspnet mvc中实现了缩短URL,你可以在这里获取它:
http://miniurl.codeplex.com/
There is an open source project that implements shortening URL in aspnet mvc on codeplex, you can get it here:
http://miniurl.codeplex.com/