-1

We have to change the way we handle the users currency and country preference for out website. Currently we store it in a database for actual and temporary customers. When a customer lands on the site and it detects they are not in the UK it will ask them to choose a location and it will refresh the page and set their currency and location. But this causes issues with Google Merchant Centre because when they go to test our products it will be defaulted GBP and a pop will display, covering the products details. (This for google shopping is a no no).

I have seen sites e.g Asos.com that will use web addresses like us.asos.com or asos.com/au/... My question is, how would one go about doing this format in .net mvc or is there a decent way of achieving this?

ashcharlton
  • 143
  • 1
  • 9

1 Answers1

1

Google generally recommends that you localize your URLs using one of the following:

  • Top level domain (www.example.co.uk/some-page)
  • Subdomain (uk.example.com/some-page)
  • Path (www.example.com/en-uk/some-page)

The easiest to implement and test in MVC is to use the path by modifying routing as in this answer.

You generally don't need to keep track of anything on the server to localize if the user can just do so by navigating to another URL.

That said, you may wish to also give the user a choice of currency to display prices in irrespective of the URL depending on your requirements. Perhaps you could add a small dropdown next to each price that sets the preference rather than using a popup.

Community
  • 1
  • 1
NightOwl888
  • 55,572
  • 24
  • 139
  • 212