Introduction
Services like Google redirects users based on their location (internet breakout). This is a problem when using Azure Virtual Desktop. This is an issue when the virtual machines are located in another country than the users. A Google page will then meet the users in an unfamiliar language.
In this article we’ll go through the following topics:
- The issue with Azure Virtual Desktop and Google
- How to stop Google from country redirect
- Azure Virtual Desktop Microsoft Edge Settings
- Final thoughts
The issue with Azure Virtual Desktop and Google
The issue is not within Azure Virtual Desktop. Google redirects users based on where it thinks users are coming from (Internet breakout). Imagine the virtual machine are located in West Europe (Netherlands), then Google will display everything in Dutch.
How to stop Google from country redirect
Users can prevent the redirection by “hardcode” the language in the URL, e.g., for US https://www.google.com/search?q=&pws=0&gl=us&gws_rd=cr or changing the language in Google Search Settings, https://www.google.com/preferences#languages
This is, however not optimal for end-users to do.
If we take a closer look at the URL, the magic happens at &pws=0&gl=us&gws_rd=cr. You can change us to whatever language you need. Let’s take a look at how to configure Group Policy with this URL.
Stop redirection when accessing google directly
When users go directly to https://google.com, they will be redirected. But by setting the default language, e.g., en-GB, Google will display that language for the users when they access Google directly.
The setting below will set the default language in Microsoft Edge:
“Set application locale”
Value: en-GB
If you try to set the language to “en” or “en-us,” this will, for some reason, not work.
Stop redirect when using address bar
Instead of going to https://google.com, it’s common to use the address bar as a starting point when searching for something. By default, Microsoft Bing is used as the search engine. These three settings must be configured to use Google with the country-specific URL.
“Enable the default search provider.”
Value: Enabled
“Default search provider name”
Value: Google
“Default search provider search URL.”
Value: {google:baseURL}search?q={searchTerms}&pws=0&gl=us&gws_rd=cr{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:searchClient}{google:sourceId}ie={inputEncoding}
Stop redirection for search suggestions
Configure the policy below to get suggestions from Google without getting redirected when searching in the address bar.
“Default Search Provider URL for suggestions”
Value: {google:baseURL}complete/search?output=chrome&q={searchTerms}&pws=0&gl=us&gws_rd=cr
Azure Virtual Desktop Microsoft Edge Settings
Below is all the settings listed together to get a better overview.
Final thoughts
Having Google display your native language in your Azure Virtual Desktop for the users makes the environment much more convenient and useable. I think this workaround is working quite well if you have internet breakout from Azure.
Pingback: AVD news of the week - Johan Vanneuville
Hi Morten, amazing article, thank you.
Would these settings also apply to the Google Chrome browser?
Hi Zebastian
Yes you can use it with Google Chrome browser aswell 🙂
Hi Morten,
Any thoughts on the search results themselves? They seem to still be based on the users IP from what I can tell, even with implementing the above.
Cheers,
Andrew.
Hi Andrew,
So the users should still see ads on the language where the breakout is.
But the other search results should be on the defined language as in the blog post.