Question

What is a good practice to name an URL if it contains repetitive letters. For example, /info/foossite

The two s looks kind of odd and if this was access point for a Web-Service, this could lead into misspelling. In most programming languages, we have Camel notation. However, as URLs are case insensitive, we don't have that luxury here.

So, what is the best practice in this regard?

Was it helpful?

Solution

I dont think its a big deal to have duplicated letters. But if you are concerned it will cause confusion or misspellings, you might use a dash in between the words, like /info/foos-site.

OTHER TIPS

HTTP URIs are not case-insensitive. The host is case-insensitive, but the path is case-sensitive (see STD 66). Check these two HTTP URIs, for example:

You’ll find that they represent different pages.

So you could use camel case URIs, e.g. example.net/FoosSite. (Note that maybe some servers, probably those running on Microsoft operating systems, treat all HTTP URIs as case-insensitive by default, so you’d have to check their documentation.)

But in my opinion there is no need for camel case. If your path contains several words, you should could use a delimiter of some kind. Probably most popular is -. Wikipedia uses _. You can find many discussions about which delimiter to use for SEO and usability. See for example this (closed) question or an (older) blog post by Matt Cutts (who is working for Google).

GrandmasterB's solution is sufficient, but I present an alternative if you're using a RESTful web service. The whole point behind being RESTful is to make a URL read intuitively. The first part of the URL is the subject of the pages.

In other words in the URL:

http://www.host.com/books/1

books would be the subject. However, there's no reason why you shouldn't be able to have URLs like:

http://www.host.com/foos/site/1

So long as it makes sense that they're separate words (i.e. please don't make URLs like http://www.host.com/book/keeper/1), I wouldn't have any problems doing it this way.

Licensed under: CC-BY-SA with attribution
scroll top