Peter Hilton - Speaking & training

Designing good URLs

The most important part of a web application’s public HTTP interface

URL design is the often neglected part of web application and web service design. However, URLs are part of your web application’s public interface, and good URLs make a better application. This short presentation introduces URL design to web developers.


So what and why do I care?

Good URLs

Benefits of good URLs

Nice URLs don’t change

Master detail URLs



HTTP requests for operations

  1. GET /widgets - list widgets
  2. GET /widgets/new - edit a new widget
  3. POST /widgets - add a new widget
  4. GET /widgets/42 - select one widget
  5. GET /widgets/42/edit - edit the widget
  6. PUT /widgets/42 or POST /widgets/42 - update the widget
  7. DELETE /widgets/42 or POST /widgets/42?method=delete - delete

Resource options

Aliases and external identifiers

Code structure

Next steps: the rest of the HTTP interface

Share on TwitterShare on LinkedIn