为什么某些网站添加"Slug"到URL的末尾? [英] Why do some websites add "Slugs" to the end of URLs?

查看:174
本文介绍了为什么某些网站添加"Slug"到URL的末尾?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多网站(包括该网站)在URL的末尾添加了明显是 slugs 的描述性内容,但据我所知,这些文字无用.

例如,网站为该问题提供的URL是:

https://stackoverflow.com/questions/47427/why-do-some-websites-add-slugs-to-the-end-of-urls

但是以下网址也可以正常工作:

https://stackoverflow.com/questions/47427/

本文的目的只是为了使URL更加用户友好还是还有其他好处?

解决方案

这些标签使URL更加用户友好,并且您知道单击链接时会有什么期望.如果搜索词在URL中,则Google等搜索引擎会将页面排名更高.

Many websites, including this one, add what are apparently called slugs - descriptive but as far as I can tell useless bits of text - to the end of URLs.

For example, the URL the site gives for this question is:

https://stackoverflow.com/questions/47427/why-do-some-websites-add-slugs-to-the-end-of-urls

But the following URL works just as well:

https://stackoverflow.com/questions/47427/

Is the point of this text just to somehow make the URL more user friendly or are there some other benefits?

解决方案

The slugs make the URL more user-friendly and you know what to expect when you click a link. Search engines such as Google, rank the pages higher if the searchword is in the URL.

这篇关于为什么某些网站添加"Slug"到URL的末尾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆