1

I have a website like Zomato. There are restaurants, and each restaurant has a page based on the country it's located in. One restaurant in the US can have the same name as another in Switzerland, but are not related at all.

I need the businesses to be able to post the URLs of their pages along with the urls of their social media pages. For example:

  • facebook.com/mcdonaldsCanada
  • twitter.com/mcdonalds_ca
  • instagram.com/ca_mcdonalds
  • ourwebsite.com/...

What would be the best option for choice of URL structure?


Option 1:

  • facebook.com/mcdonaldsCanada
  • twitter.com/mcdonalds_ca
  • instagram.com/ca_mcdonalds
  • ourwebsite.com/ca/mcdonalds

Pretty much straight forward. You put the country followed by the business name. This will be uniform for all businesses to prevent fragmentation such as mcdonalds_ca and canada_mcdonalds.

Pros:

  • Easy to manage; simple structure.
  • Easy to differentiate between local businesses.

Cons:

  • Restaurants will have to follow our website logo (like how they put the logo of facebook followed by /businessname) or url with a /ca and then their business names, as opposed to the uniform way of having the business name right after our domain name. For example:

    • [FBLogo]/mcdonaldsCanada
    • [TwitterLogo]/mcdonalds_ca
    • [InstaLogo]/ca_mcdonalds
    • [OurLogo]/ca/mcdonalds

Option 2:

  • facebook.com/mcdonaldsCanada
  • twitter.com/mcdonalds_ca
  • instagram.com/ca_mcdonalds
  • ourwebsite.com/mcdonalds (enters this url and redirects to one of below)
    • ourwebsite.com/ca/mcdonalds
    • ourwebsite.ca/mcdonalds
    • ca.ourwebsite.com/mcdonalds

In this option, the user types in the name of the business, the page of the restaurant closest to him based on his GPS or IP Address location will open up, but first a modal will show up asking him to confirm the location of the restaurant with a checkbox provided to remember his choice. If he confirms his location, the modal simply disappears as he's already on the page, otherwise, it would take him to the page of the other location he chose. On the page there would always be an option available to change location, should the user wish to do so upon return, if he enabled the "remember" option.

Pros:

  • Looks more similar, yet better than, the other social media links. (Looks good next to a logo)
  • Shorter.
  • Easier for the user to remember and use URL.
  • More choices of differentiating location through URL (can be through tld, subdomain, or subfolder "/").

Cons:

  • IP Address and GPS tracking is not always guaranteed to be right.
  • Extra clicking for users on first visit as it prompts them to confirm location.
  • More difficult to implement.
  • Might make users think two businesses are the same if they both used the same URL, even though they would be provided with the choice of confirming location upon visit.

2 Answers 2

2

I'm coming from a web developer perspective, so I am a bit biased, but here's my two cents:

Local domains are great, but hard to remember, if you're going to be using different countries, I would go with website.com/ca/mcdonalds. This actually makes it easier for other websites to integrate as well, as it is a simple RESTful interface. The /ca/ designates a separate part of your website, in this case for Canada. You should use a standard two-letter country code set for this. Then whom ever is using the service just puts the name afterwards, pretty straight-forward (known as the id in a RESTful interface).

This also has the bonus of better SEO than some of the other option, as the search engine can figure out what each part of the url means.

Lastly, and this is pretty important: when a user visits website.com/mcdonalds, you should try to divine which country they want based on their IP Address and redirect them to that country's site, that said, you should also provide a link on that page back to all the other website.com/??/mcdonalds.

1

A URL must uniquely identify a page.

This is simply a basic principle, and you should discard any option that breaks it. Note the requirement you mention in your question:

I need the businesses to be able to post the URLs of their pages...

It won't be acceptable to businesses if the only available URL goes to a page where the user selects from multiple businesses with the same name.

Why the assumption that only one restaurant in a country will have the same name?

This seems odd...especially given that you have chosen McDonalds as your example! I don't think this assumption is warranted. If your entire unique naming scheme is built around unique restaurant names per country, it is bound to break if the website is a success.

What if a restaurant wants to change its name?

This might present a problem as well. Do you simply prohibit name changes? If they change the name, does their URL change? That might not be desirable.

Conclusion

You need a robust system that can provide unique URLs flexibly, without relying on assumptions of names not overlapping. There are quite a few options out there--take a look at what other sites do.

The solution I prefer is the one this site itself uses: there is a unique number to identify the page, then the page title comes after that (but the title doesn't need to be unique, and it could change without breaking the URL, because the unique number is the only part actually used for navigation). See this discussion for more.

So you could have: yourwebsite.com/39481/mcdonalds

4
  • The pages are per business, not branch, so there will be one McDonald's per country. Though, again, wouldn't your url look quite bad next to the urls of the business on other social media?
    – yaserso
    Mar 7, 2015 at 9:01
  • 2
    Don't think that using unique IDs inside the URL solves a problem here. Those IDs looks like magic numbers for the users, they will not remember it for sure. Imagine telling your URL to some stranger in a street: "It's yourwebsite dot com slash three four six eight nine one slash mcdonalds". Sounds nice and easy to remember, right? :)
    – Ignas B.
    Mar 7, 2015 at 10:55
  • 1
    @IgnasB., how often does someone manually type in a URL these days?
    – user31143
    Mar 7, 2015 at 22:12
  • @dan1111 you have a point for sure, but what if you want to print URL on a poster for example? Even in 2015 not everything happens online. Anyways, I'm always against some magic numbers or symbols in a URL that does not make any sense for the user.
    – Ignas B.
    Mar 11, 2015 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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