How to do Geo-targeting
Geo-targeting is a powerful feature that allows you to direct your internet traffic through specific geographical locations. This technique is essential for accessing region-restricted content, conducting localized market research, and improving the relevance of your online activities. Using geo-targeting, you can ensure that your internet presence appears to originate from desired locations worldwide.
There are two ways geo-targeting can be applied.
- By using the Dashboard
- Via Username Configuration
Method 1: By Using the Dashboard
Step 1: Log In to Geonode Dashboard
Access the Geonode Dashboard using your registered account credentials.
Step 2: Use the Dashboard Method
Step 2a: From the side navigation bar, click on the type of service you purchased.
Step 2b: Scroll down until you see the "Proxy Configuration" section.
Step 2c: In the "Proxy Configuration" section, choose the session type (either Sticky or Rotating) and the protocol (either HTTP or SOCKS5) that you want to use.
Step 2d: Select the geo-location that you want to target and the port you want this geo-location to be assigned to.
Choose the State or City if applicable. Select the port to use.
Step 2e: Click the "Add" button to add this configuration to your account.
Step 2f: Click the "Delete" option if you want to delete a specific geolocation.
Step 2g: Once you configure the dashboard, execute the cURL command to check if it is working.
Method 2: Via Username Configuration
Request
GET
curl -x <username>-country-<country-code>:<password>@<service-name>.geonode.com:<port> http://ip-api.com/json
Parameters
username
string
Your API username (Required)
country code
ISO 3166-1 alpha-2
The target country code. (You can obtain the country code list using this link.)
password
string
Your API password (Required)
service-name
e.g., residential-premium
The name of the service that you purchase.
port
integer
The target port number. 9***'s for rotating and 10***'s for sticky proxies.
Implementation
Fill in the needed credentials from the service you purchased:
curl -x <service-name>.geonode.com:<port> -U <username>s-country-<country-code> http://ip-api.com
Note: For this example, we will use <country-code> = us.
Expected Response
{
"status" : "success",
"continent" : "North America",
"continentCode": "NA",
"country" : "United States",
"countryCode" : "US",
"region" : "VA",
"regionName" : "Virginia",
"city" : "Roanoke",
"district" : "",
"zip" : "24018",
"lat" : 37.2555,
"lon" : -80.0531,
"timezone" : "America/New_York",
"offset" : -14400,
"currency" : "USD",
"isp" : "Verizon Business",
"org" : "Verizon Business",
"as" : "AS6167 Verizon Business",
"asname" : "CELLCO-PART",
"mobile" : true,
"proxy" : false,
"hosting" : false,
"query" : "174.225.52.55"
}
Conclusion
Geo-targeting is a valuable strategy for directing internet traffic to specific geographic locations, enabling access to region-restricted content, and enhancing the relevance of online activities. Utilizing this feature, you can ensure that your online presence aligns with your desired locations worldwide.