I am developing a web application, and wondering if it is important to have URLs which are explicit and informative for the user or not? Or should I just focus on the good design of the web pages themselves as the whole attention of the user goes there?

EDIT:

I am not asking about the base URL (like: https://www.example.com) but about the URLs related to the different parameters of the site.

For example:

For one particualr page, should I have:

https://www.example.com/1/2/3/4/

Or:

https://www.example.com/continent/1/country/2/region/3/town/4/
  • 29
    Human readable URLs have benefits for SEO and other similar factors, and it’s clearer how a user might navigate manually to a parent section directly by manipulating the URL, but your second example is still confusing; normally human readable URLs use slugs to replace meaningless IDs. – Kit Grose Oct 15 at 9:50
  • 10
    For one, I love how Wikipedia does it. I type "en.wikipedia.org/wiki/" and then I can type whatever I want to search. I can include slashes, and spaces. Wikipedia normalizes spaces to underscores to make the URL even more readable. I remember it was super handy to go straight to the page I wanted by typing the URL when I had bad internet connections, too. – JoL Oct 15 at 16:52
  • 5
    Who is "the user"? If you have not yet characterized the different stakeholder groups who would be using the site, you are not yet prepared to tackle questions such as this. – rumtscho Oct 15 at 17:13
  • 4
    Much more important than what the URL looks like is that they keep working. If you redesign your website and old URLs stop working your users will be annoyed. And if a user sends a URL to somebody else they should be able to view the URL as well (of cause excluding user data if applicable). – kasperd Oct 15 at 19:25
  • 4
    Why can't it be example.example/oceania/australia/nsw/melbourne ? – immibis Oct 16 at 0:07
up vote 62 down vote accepted

Given the two options, I would go for the second...

However! What I would consider to be the best option is a third alternative. Something that combines information and instructions:

https://www.example.com/europe/sweden/ostergotland/linkoping/

This format gives the user a hint of what to write and expect. It's easy to understand that example.com/europe/ gives available countries in Europe and that

https://www.example.com/north-america/usa/california/san-francisco/

is the URL for viewing San Francisco.

Your options doesn't really tell the user what to expect. What region is 1? Which one is 2? Was it /1/2/3/4/ or /3/3/2/4/ for Paris?

I understand that using a text-ID for a city might not be feasible for you, but it's nonetheless the option I would recommend.

Some friendly reminders on the way:

  • Keep in mind that the use of regions are different depending on the culture of the user. Americans might be used to enter information about their state, while a Swede doesn't really put any significance in the region and would prefer to write /europe/sweden/linkoping/

  • Remember to be kind to users who makes mistakes and writes /europe/cannada/toronto/ Don't just tell them "Incorrect country ID" but help them remedy their mistake by saying something like "Cannada is not a country in Europe" or simply fix the error for them.

  • 14
    Be careful with this approach. Continents and countries rarely change names. Websites change all the time. Let's say you omit the IDs from your URLs and leave only slugs. What happens when a webpage's title gets updated? Will its slug update too, breaking existing links? What if your website gets migrated to a new system, which uses a different, better slug generation algorithm? Will you accept both algorithms in parallel or invest time in setting up potentially thousands of redirects? If you included IDs, these are easy fixes. Link rot is bad UX. – Illya Moskvin Oct 15 at 15:45
  • 9
    or simply fix the error for them -- as a user I do not want my errors to be fixed for me. I want to be educated about what my error was so that I can make better use of your service in the future – inetknght Oct 15 at 15:46
  • 17
    To add to Illya Moskvin's comment, I imagine that's why StackExchange includes an id in the URL in addition to the question title. The question title is there only for the user. You can change it to anything and the URL will still work to bring us here because the server will use the id instead. I don't suppose that's always the best option, though. I don't think it would be nice for Wikipedia to do that, for example. – JoL Oct 15 at 16:58
  • 13
    @JAB There's different needs between StackExchange and Wikipedia, though. You can't guess the title of a StackExchange question as well as you can guess the title of a Wikipedia article. Also, a StackExchange URL should always point to a particular QA page, while in Wikipedia, it should be any page that talks about the title. If, for an ambiguous title, Wikipedia found that one interpretation is more popular than another, I wouldn't mind them changing the article the URL points to to the more popular interpretation (given they have a link to a disambiguation page). – JoL Oct 15 at 19:59
  • 4
    @inetknght Better by far is to do both: fix my mistake and educate me. Consider Google's approach. If it thinks a user mistyped a word, it will automatically correct it, but it will provide an explicit message that it has done so and also provides a way for the user to enforce their original "incorrect" query, should they choose. In most cases, Google will be correct in its assumption the user made a mistake and will both avoid wasting the users' time and provide a gentle correction they can choose to learn from. – jmbpiano Oct 16 at 14:04

There are multiple benefits for the user when you have "smart url" that is descriptive and semantic. Another good reference;
https://www.nngroup.com/articles/url-as-ui/

Based on article, IMO these are valid arguments for having proper URL;

  1. a domain name that is easy to remember and easy to spell
  2. easy-to-type URLs
  3. URLs that visualize the site structure
  4. URLs that are "hackable" to allow users to move to higher levels of the information architecture by hacking off the end of the URL
  5. persistent URLs that don't change
  6. URLs that follow main menu namings.. i.e. for "About us" main menu item, "about-us" url
  • 6
    What are those benefits? I'm afraid this answer is not complete or particularly useful without listing at least one of them. – pipe Oct 15 at 11:12
  • 16
    Not sure that a link from 1999 that talks about how important email is for people to find new web sites and how domain names will probably be dead in 3-5 years is really the best source. – Voo Oct 15 at 11:22
  • 4
    I would still take up key points from the article as all valid arguments. I have updated the answer. – xul Oct 15 at 12:07
  • 1
    An example of a site with a 'URL as UI' is traintimes.org.uk/london/edinburgh/0900/friday - I can just type that URL off the top of my head and it takes me to the right place. It also handles variations - eg traintimes.org.uk/london/edinburgh/friday/0900 also works. This kind of URL is essentially a DB query, but just intended for humans in a hurry. – user1908704 Oct 16 at 18:22

They can be, yes.

  • human readable URIs help with search engine optimisation. URLs are shown in search results to give users a hint as to the relevance of a result. An explicit URL therefore helps your users identify your content before they enter your site.
  • human beings do sometimes write out URLs “manually”. They occasionally share them over the phone or verbally. Whilst this isn’t common, when it’s necessary, it’s extremely important the URLs are easy to remember and repeat, because a single typo can break the whole thing.
  • sometimes power users will edit URLs to navigate faster. These users love it when they feel they have “mastered” your information architecture.
  • explicit URLs will break in a user-friendly way when your URL structure changes. For example: I enter france/hotels/ when you’ve changed the structure to hotels/france, I get a 404, or maybe a redirect. Whereas if I enter 4/72 when you now expect 72/4, I’m liable to end up on the wrong page entirely, because it’s no longer possible to tell my URL is invalid.
  • 1
    Great points. To add to this, not only is this helpful when verbally sharing a link. It also helps when for example someone is mailing it. The receiver would know what it is about, before visiting the webpage. – Daan Oct 17 at 7:46

Welcome to UXSE.

A good UX is holistic, therefore, you should focus on both a good design of the webpages and keep URLs as explicit and informative as possible. In this case giving the user a cake and letting them eat it will give the best UX.

Not only can URLs help users understand a page better but they can also be useful for SEO.

A URL that will hand itself to great UX will be:

  • Easy to remember
  • Easy to spell and type
  • Clear as possible
  • Authentic to the service

(Source)

Edit: As such, I would go for your second option. https://www.example.com/continent/1/country/2/region/3/town/4/ It is more informative and understandable to the user. In this case your users would also be able to go straight into the URL and change the page without having to press the back button numerous times, in the case that they wanted to search a different region within that country.

  • 1
    I read that link quickly, and I am sorry if my question is not clear, I wanted to talk not about the domain name of the website, but the URLs of specific pages of the website. You may check my edit when you have time. Thank you – Billal Begueradj Oct 15 at 7:09
  • I see how you might have thought I was confused but actually I understood what you meant. I'll edit my answer to make that clearer though :) – RobbyReindeer Oct 15 at 8:12
  • 3
    My App currently has urls like www.domain.com/posts/23931JeJF2eR since this is basicly the post ID, would it be better to go the way Stackoverflow handles it with an extra url parameter which is for UX only? Like www.domain.com/posts/23931JeJF2eR/are-urls-important-for-the-user ? – Badgy Oct 15 at 9:22
  • 2
    @Badgy The extra parameter has a lot of benefits if the URL is shared, copied or stored. Someone will immediately have a notion of what content hides behind the URL - your click-rate may improve significantly depending on usage. – Falco Oct 15 at 11:55
  • 4
    +1 Good UX should be holistic, and even though it may not be as important or visible aspect of a web page, it does add some important aspects as you have pointed out :) – Michael Lai Oct 15 at 13:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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