Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do some websites add "Slugs" to the end of URLs? [closed]

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?

like image 882
Dave Webb Avatar asked Sep 06 '08 13:09

Dave Webb


People also ask

What does a URL slug do?

A URL slug refers to the end part of a URL after the backslash (“/”) that identifies the specific page or post. Each slug on your web pages needs to be unique, and they provide readers and search engines alike with information about the contents of a web page or post.

Why are urls called slugs?

The name is based on the use of the word slug in the news media to indicate a short name given to an article for internal use.

What is the difference between slug and URL?

The URL refers to the entire thing. The slug is the part of a URL that explains what the page (path) you're going to is about in human-friendly keywords.

Do URL slugs matter for SEO?

Are Web Slugs Important for Search Engine Ranking? The short answer is yes. Using SEO keywords in your URL can help you rank for your target keywords. Google uses the URL as a factor in ranking your page, so if the URL slug includes your keywords, then Google will be more likely to rank it.


2 Answers

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.

like image 144
Espo Avatar answered Oct 07 '22 09:10

Espo


Usability is one reason, if you receive that link in your e-mail, you know what to expect. SEO (search engine optimization) is another reason. Search engines such as google will rank your page higher for the keywords contained in the url

like image 30
Michiel van Oosterhout Avatar answered Oct 07 '22 09:10

Michiel van Oosterhout