Discussion of the appropriate design of URLs (e.g., for readability and hackability).
Questions tagged [url-design]
69 questions
401
votes
9 answers
When should I use a trailing slash in my URL?
When should a trailing slash be used in a URL? For example - should my URL look like /about-us/ or like /about-us?
I am fully aware of the SEO-related issues - duplicate content and the canonical thing; I'm trying to figure out which one I should…

Denis
- 4,718
- 5
- 18
- 20
27
votes
10 answers
Menu path in Pathauto
How do I get pathauto under Drupal 7 to generate a URL alias by the full menu path?

dantz
- 1,842
- 4
- 21
- 25
22
votes
11 answers
What is the best place to display the language in your URL?
I have a multi-language website that makes use of pretty URLs, so called search-engine-friendly URLs.
Now there are a few places to define the language in the…

Saif Bechan
- 16,551
- 23
- 83
- 125
16
votes
1 answer
What's the best practice for URL path casing and spacing?
I want to know what is considered a good practise for casing and spacing in URL paths.
Casing:
Lower-case
Camel case
Pascal case
Spacing:
None
Hyphen
Underscore
../data/upload_data
../data/upload-data
../data/uploadData
../Data/UploadData …

Pk King X11
- 163
- 1
- 1
- 7
16
votes
3 answers
Best practice for URLs of multi-language websites
What is considered the best strategy for URLs of translated websites? Something I see happen frequently is:
http://example.com/english-slug.html
http://example.com/de/english-slug.html
http://example.com/fr/english-slug.html
This has the (minor)…

Roy Prins
- 2,790
- 2
- 28
- 47
12
votes
5 answers
Canonical url and localization
In my application I have localized urls that look something like this:
http://examle.com/en/animals/elephant
http://examle.com/nl/dieren/olifant
http://examle.com/de/tiere/elefant
This question is mainly for Facebook Likes, but I guess I will hit…

Dirk Boer
- 8,522
- 13
- 63
- 111
11
votes
2 answers
Should default language of multilingual website be a part of the URL?
I have set up a multilingual website, whose default language is English and it is translated in many more languages. We have chosen for the subdirectory URL strategy, so that our URLs are like example.com/en, example.com/fr etc. Should the default…

Argyro Kazaki
- 631
- 2
- 6
- 15
10
votes
3 answers
Should AJAX use hashtag /#!/ or not?
I've made a webpage that has the URL-form http://www.example.com/module/content
It's a very dynamic webpage, actually it is a web app.
To make it as responsive as possible, I want to use AJAX instead of normal page requests. This is also enabling me…

Student of Hogwarts
- 1,108
- 3
- 14
- 28
9
votes
1 answer
CRUD URL Design for Browsers (not REST)
Many questions has been asked on Stack Overflow for RESTful URL design
To name a few...
Hierarchical URL Design:
Hierarchical RESTful URL design
Understanding REST: Verbs, error codes, and authentication: Understanding REST: Verbs, error codes, and…

Dachstein
- 3,994
- 6
- 34
- 61
8
votes
1 answer
Why does Wikipedia use a modified percent encoding in their URL fragments?
I noticed that Wikipedia uses percent encoding for the path section of a URL, but converts the % character to . for the #fragment.
For example, on the Russian 'Russia' page, the URL for section 2 (История)…

Deebster
- 2,829
- 1
- 26
- 26
7
votes
2 answers
Why does Twitter (twimg.com) use a suffix for size (e.g. ':large') instead of a query parameter
Why does Twitter (twimg.com) use a suffix for size (e.g. ':large') instead of a query parameter?
Example:
https://pbs.twimg.com/media/CrhajQHXgAEQ2US.jpg:large
From an architectual standpoint I find this interesting and I'm wondering if I'm missing…

Nino Floris
- 73
- 2
- 5
7
votes
4 answers
Should a Web site also be a Web resource?
Every web application - every web site - is a service. (...) The features that make a web site easy for a web surfer to use also make a web service API easy for a programmer to use.
Richardson and Ruby, "RESTFul Web Services"
As I intend it, a Web…

Rigel Di Scala
- 3,150
- 2
- 17
- 23
6
votes
3 answers
Hierarchical RESTful urls still preferred - in terms of added overhead - over flat urls?
Let's say I have a website where users can upload and show their pictures. A RESTful url to a single picture of that user would look like:
http://api.gallery.com/users/{user-id}/images/{image-id}
But the image-id itself is already unique, so this…

roberkules
- 6,557
- 2
- 44
- 52
4
votes
1 answer
URL structure for multi-language site
I want to make a multi-language site, but I'm not sure what the best way is to deal with the URL structure from a SEO point of view. Some examples:
Product
example.com/product/123/en/product-name
or
example.com/product/123/product-name/en
Or…

Mona Baharlou
- 1,401
- 1
- 13
- 26
3
votes
2 answers
Hierarchical vs. flat URL
I have a resource structure like flight > seat > reservation, so a reservation belongs to a certain seat which belongs to a certain flight:
http://example.com/jdf_3prGPS4/1/jMBDy46PbNc
----------- - -----------
…

deamon
- 89,107
- 111
- 320
- 448