PDF download Download Article
Use the Tor web browser to fake your location
PDF download Download Article

When you use Tor to browse the web, your connection to the site is passed through random IP addresses based in various countries. This is great for keeping your real location private, but unhelpful if you want to visit a website that only allows connections from a particular country. If you want the sites you browse to think you're connecting from a specific location, you can add custom entry and exit nodes to your configuration file. It's better to use a VPN to fake your location, but Tor will work if you don't have one. This wikiHow teaches you how to change your country in the Tor web browser on Windows, Mac, and Linux.

Quick Steps

  1. Open the “torrc” file in a text editor.
  2. On the first empty line, type: EntryNodes {} StrictNodes 1
  3. On the next line, add: ExitNodes {} StrictNodes 1
  4. Type the country's two-letter code (e.g., CA for Canada) into the brackets.
  5. Save and exit the file, then restart Tor.
  1. Open Tor at least once. You'll need to run Tor at least once to create the file you'll be editing. Just double-click the Start Tor browser icon in the folder where you've installed Tor and click Connect at least one time.
    • If you've already started Tor, close it—you'll need to make sure the app is closed so you can effectively edit the configuration file.
    • Not all sites and regions permit traffic from Tor, so you may not be able to access all websites using the browser.
    • The Tor Project does not recommend changing your configuration to specify a country, as this could compromise your anonymity. [1] The best way to spoof your country is to use a VPN .
  2. The location of the Tor configuration file varies depending on where you installed the app:
    • Windows
      • The default installation location for Tor is a file called "Tor Browser" on your desktop. The torrc file is located in the Browser/TorBrowser/Data/Tor within that "Tor Browser" folder.
      • To get there, double-click Tor Browser on your desktop, double-click the Browser folder, double-click TorBrowser , double-click Data , then double-click Tor .
    • Linux
      • The default install location is a folder called "Tor Browser" on the desktop. [2] Double-click the Tor Browser folder to open it, double-click the Browser folder, double-click TorBrowser , double-click Data , then double-click Tor .
      • If you don't see such a file, you can use the find command to locate it.
    • Mac
      • The default location for the torrc file is inside ~/Library/Application Support/TorBrowser-Data/Tor.
      • To get there, open Finder, press Command + Shift + G , and enter or paste this address into the field: ~/Library/Application Support/TorBrowser-Data/Tor . [3] Click Go to open the folder.
    Advertisement
  3. To do this, double-click the file. If it doesn't automatically open a text editor, you'll be prompted to choose one (e.g., Notepad for Windows or TextEdit for macOS).
  4. To set Tor to a specific country, you'll need to make sure there are nodes available in that country. Go to https://metrics.torproject.org/rs.html#advanced , select a country from the "Country" menu, and click Advanced Search . If a list of nodes appears, you can use that country as your location.
    • If only a couple of nodes are in that country, you might want to repeat the search for some backup countries to use. You can enter multiple countries, so if no nodes are available in your preferred country, Tor will use the next country on the list.
    • Not all countries have Tor nodes. If you see "No Tor relays matched your query", there are no nodes in that country.
    • Make note of the country's two-letter code, which appears after "country:" in the search box at the top-right corner of the Relay Search page—for example, FR for France and MD for Moldova. You'll need this code when setting your country.
    • On the first empty line, type EntryNodes {} StrictNodes 1 .
    • On the next empty line, type ExitNodes {} StrictNodes 1 .
  5. Inside the curly brackets {} , type the code for the country you want websites to think you're in.
    • For example, ExitNodes {eg} StrictNodes 1 means Tor will only use the country "eg" (Egypt) as an exit node, forcing your traffic to be routed through one of Tor's Egyptian exit nodes.
  6. If you only enter one country code as your entry and exit nodes, that will be the only country through which your connection is routed. That can cause problems if no nodes are available in your chosen country when you want to connect. It's best to add multiple countries, especially if few nodes are available in your preferred country. To do this, enter more country codes inside of the brackets, separating them with commas. For example, to add Canada, Egypt, and Turkey to the "ExitNodes" line, you would have the following line:
    • ExitNodes {ca},{eg},{tr} StrictNodes 1
      • Make sure there are no spaces between bracketed countries.
  7. The "StrictNodes 1" value means Tor will not try to use countries other than those you've specified. However, it also means that if no nodes are available in the regions you entered, you won't be able to make the connection. You can replace StrictNodes 1 with StrictNodes 0 to ensure that Tor can still use other countries' codes if those specified aren't working.
  8. If you're using Windows or macOS, just click File , select Save , and exit the app. Saving the file in Linux depends on which text editor you're using. If you're using a graphical text editor, you can usually press Ctrl + S to save.
  9. Go to any website (e.g., wikihow.com) in Tor, and then click the padlock icon on the address bar at the top of the browser. Now you'll see the entry, middle, and exit nodes, which should match what you entered into the file.
    • The Exit Node is the country the website thinks you're in.
  10. Advertisement

Community Q&A

Search
Add New Question
  • Question
    What about Linux?
    Community Answer
    Edit /etc/tor/torrc.
  • Question
    How do I make the last IP in the node be from a specific country?
    Community Answer
    Open the folder where you have installed Tor, browse through browser > Tor browser > Tor > data. There you will find a file named "torrc." Open the file with Notepad. At the end of the document, on a new line, write this: ExitNodes {US}. For example, if you want your exit node to be in China, type {CN}.
  • Question
    How do I make Tor select a specific state in a country, like California?
    Community Answer
    You cannot. You can only select a specific country.
See more answers
Ask a Question
      Advertisement

      Tips

      • If you're having trouble connecting to websites, click the hamburger menu in the upper-right corner of Tor and select New Tor circuit for this site .
      • If an exit or entry node is not accepting connections on the port you're using (for example, port 443 if you're connecting to a secure website), you won't be able to connect to that site.

      Tips from our Readers

      The advice in this section is based on the lived experiences of wikiHow readers like you. If you have a helpful tip you’d like to share on wikiHow, please submit it in the field below.
      • Consider making a backup of torrc before editing. This will make it easier to revert to the default configuration when you no longer want to use those country settings.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      • While changing the exit and entry nodes to specific regions can effectively make certain websites show you content it wouldn't otherwise, it can prevent Tor from effectively protecting your anonymity. This may not concern you if you're just watching YouTube videos . However, if you really need to stay anonymous, Tor recommends using their default settings. [4]
      Advertisement

      About This Article

      Article Summary X

      1. Open Tor at least once and then close it.
      2. Open the "torrc" file in a text editor.
      3. Add the code to specify specific countries.
      4. Save the file and restart Tor.

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 1,146,205 times.

      Is this article up to date?

      Advertisement