0

My website is a website for sharing studying materials between students for the Israeli "Bagrut" exam.

I hate URLs that are built from numbers that don't mean anything so I've been using URL slugs.

My website has already organized each subject into a hierarchy of:

subject > cateogry > subcategory

So naturally the URL hierarchy is:

subject/category/subcategory/material

The material added by users is actually in Hebrew so the last one will have to be a number.

What I'm worried about is that the URLs are getting very very long; for example:

http://www.example.com/subject/history_a/nationalism-israel-other-nations/characteristics-nationalism-national-movements-europe-19th-century/12

They were even longer to begin with but I dropped some words to make them shorter.

should I give up? Is this even worth it?

  • I stick to a simply logic: Can I pronounce this to another human? The better that scores, the better I like the url. – Martijn Aug 27 '15 at 14:07
1

You want to keep URLs as short and simple as you can. Short URLs are easier to write down on paper and easier to type in as well.

This URL...

http://www.example.com/subject/history_a/nationalism-israel-other-nations/characteristics-nationalism-national-movements-europe-19th-century/12

...is probably the 3rd longest URL I have ever seen.

The best thing to do is categorize more. Start with a domain name that best represents the exam such as:

http://www.bagrutexam.com

then you don't really need the word subject in the URL because that will be mentioned in the home page and it will be obvious in the other pages as you construct them.

Then decide on a major subject category which in your URL is history:

http://www.bagrutexam.com/history

Then if you want a subtopic, keep it short too:

http://www.bagrutexam.com/history/nationalism

Then maybe one more subtopic:

http://www.bagrutexam.com/history/nationalism/19th-century

Then a number identifying the exam itself:

http://www.bagrutexam.com/history/nationalism/19th-century/1

and for the second part:

http://www.bagrutexam.com/history/nationalism/19th-century/2

Try not to use more than two words between any two slashes in the URL or it will become very messy, and always choose the best words in the URLs that users will likely search for to reach the page.

Also, if you expect to have the URLs emailed or compatible with every device in the world regardless when it is made, then you should keep the URL length to under 80 characters.

Another disadvantage to long URLs is that too many characters will cause the server to produce its own errors. In apache, the maximum URL length is by default slightly under 8190 characters.

See: http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline

3

The main reason for using "URL slugs" is usability. Making the URL readable and easier to remember (and perhaps help click through rates in the SERPs).

However, as you fear, a long URL lessons usability. (If it's too long it's not going to show in the SERPs anyway.)

But how long is too long?

This could depend on the subject matter and the range of material on your site. If it's still useful to users and isn't causing problems then it's probably OK. However, you don't really want it to get much longer. Can you not shorten your subcategories?

characteristics-nationalism-national-movements-europe-19th-century

This seems very verbose. Don't think keywords (SEO). Think about your users.

  • This is already shortened, the original subcategory would be: Characteristics of modern nationalism and national movements in Europe in the 19th century – davegri Aug 28 '15 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.