Your server is in Tokyo or Seoul, yet YouTube shows content for the United States, YouTube Premium says your country does not match, or Gemini and other Google services say they are not available in your region. Before you reinstall the system or move to another server, check one thing: in most cases Google has simply placed this server's IPv4 address in the wrong country, while it reads the same server's IPv6 address correctly. This guide follows a "find the cause first, then fix it" order: two commands show where the problem is, then you add IPv6 to the server and let Google traffic use it. Every JUSTG VPS supports IPv6, and it is free.
Typical symptoms
- The YouTube home page recommends content from another country, and the country shown at the bottom of the page is wrong.
- YouTube Premium or YouTube Music says your current country or region does not match your membership.
- Gemini, Google AI Studio and similar services say they are not yet available in your region.
- Google Search sends you to another country's results, or Google Play shows the wrong region.
If, at the same time, ChatGPT, Netflix and other services detect the correct country, and the major IP lookup sites also show the right location, the problem is almost certainly limited to Google's own geolocation data. To check where an IP is registered, see What Is a Native IP and How to Check Your Server's IP Location.
Step 1: confirm with two commands whether IPv4 is misplaced
On the server, ask two questions over IPv4 and over IPv6: where is this IP at the network level, and where does YouTube think you are?
# 1) Location at the network level (see the loc= line)
curl -4 -s https://www.cloudflare.com/cdn-cgi/trace | grep -E '^(ip|loc)='
curl -6 -s https://www.cloudflare.com/cdn-cgi/trace | grep -E '^(ip|loc)='
# 2) Which country YouTube thinks you are in (see INNERTUBE_CONTEXT_GL)
curl -4 -s -H 'Accept-Language: en' https://www.youtube.com/ | grep -o '"INNERTUBE_CONTEXT_GL":"[A-Z]*"' | head -1
curl -6 -s -H 'Accept-Language: en' https://www.youtube.com/ | grep -o '"INNERTUBE_CONTEXT_GL":"[A-Z]*"' | head -1
How to read the results:
- The IPv4 GL is wrong and the IPv6 GL is right: this is the case this guide covers. Follow the steps below to send Google traffic over IPv6.
- Both are right: the IP is fine. The cause is most likely the browser cache, or the country of your Google account or payment profile. See "Still wrong?" at the end.
- The commands with
-6print nothing: the server does not have working IPv6 yet. Do Step 2 first.
Test example (November 2026)
We ran the commands above on our machines in Tokyo and Seoul. The network-level location was correct on both, but YouTube placed the IPv4 address of both machines in the United States. Over IPv6, it showed the local country again:
| Machine location | Cloudflare location (IPv4 / IPv6) | YouTube country (IPv4) | YouTube country (IPv6) |
|---|---|---|---|
| Tokyo, Japan | JP / JP | US | JP |
| Seoul, South Korea | KR / KR | US | KR |
Google updates its geolocation data from time to time, so your IP may give different results from the table. Go by the test on your own server.
Why this happens
Google does not rely only on public IP databases. It decides a range's country itself, partly from how the addresses were used in the past. An IPv4 range may have been used by several organisations and announced in different regions, and Google's data is slow to catch up, so you end up with "the address is in Japan, but Google thinks it is in the US". IPv6 ranges are newer and have a cleaner history, and Google usually gets them right straight away. The server's location and network routes have not changed; only Google's view of the address has.
Step 2: add IPv6 to your VPS
- New order: in the "Additional IPv6" option, choose the tier marked Free. IPv6 is assigned automatically when the VPS is set up.
- You did not choose it at sign-up: go to the client area → My Services → your VPS → Upgrade/Downgrade Options, change IPv6 to the free tier and confirm. IPv6 will then be assigned.
Once it is assigned, the IPv6 address appears on the service details page in the client area. If ip -6 addr on the server does not show it, configure it by hand as described in How to Configure IPv6 on a VPS.
Step 3: check that IPv6 works
ip -6 addr show scope global # shows the assigned IPv6 address
ip -6 route show default # a default IPv6 route exists
ping -6 -c 3 www.google.com # replies come back
When all three look good, run the two -6 commands from Step 1 again and confirm that YouTube's GL now shows your local country.
Step 4: let Google connections prefer IPv6
Linux prefers IPv6 by default: if a domain has an IPv6 address (Google and YouTube do), the system tries IPv6 first. So in most cases, adding IPv6 is enough. You can check it like this:
curl -s -o /dev/null -w '%{remote_ip}\n' https://www.youtube.com/
If the output is an IPv6 address (with colons), traffic already goes over IPv6. If it is still IPv4, check whether someone changed the system's address preference:
grep -v '^#' /etc/gai.conf | grep precedence
If you see the line precedence ::ffff:0:0/96 100 (which means "prefer IPv4"), put a # in front of it to comment it out. No reboot is needed. If you use a browser on the server over remote desktop, close the browser and open it again after the change.
Still wrong?
- Clear the old state: sign out of Google in the browser, clear the cookies for youtube.com and google.com, or try a private window.
- Check the account's own country: YouTube Premium availability also depends on the country of your Google account and payment profile. With the correct IP but a different account country, you will still see the "not available" message.
- Try another IPv6 address: addresses in the same range usually give the same result, but you can switch the server to another address assigned to you and test again.
- Contact us: paste the output of the four commands from Step 1 into a ticket and we will look at it with you.
To check Netflix, Disney+ and AI services as well, see How to Check if Your VPS Works with Netflix, Disney+ and AI Services.
FAQ
Does IPv6 cost extra?
No. Every JUSTG VPS can get IPv6 for free.
Will adding IPv6 affect my existing sites or IPv4?
No. Your IPv4 address stays the same; IPv6 is added alongside it.
Could Google get it wrong again later?
Google's geolocation data changes. Your IPv4 may become correct again on its own after a while, and IPv6 is not guaranteed to stay correct forever either. If something looks wrong, re-run Step 1 to see which side has the problem.