How to Set Up IPRoyal ISP Proxies on Linux for SEO Monitoring
A beginner-friendly guide to configuring IPRoyal ISP proxies on Linux for consistent SEO monitoring. Learn to test with curl, set environment variables, and script with Python.
Overview
IPRoyal ISP proxies provide static residential IP addresses that are ideal for SEO monitoring tasks where consistent sessions and stable geolocation matter. Unlike rotating residential proxies, ISP proxies keep the same IP for the duration of your plan, reducing the chance of triggering anti-bot measures due to frequent IP changes. This tutorial shows you how to set up IPRoyal ISP proxies on a Linux machine and use them with command-line tools and Python for SEO monitoring.
Prerequisites
- A Linux distribution (Ubuntu, Debian, Fedora, etc.). Commands are tested on Ubuntu 22.04 but should work on most distros.
- An active IPRoyal account with at least one ISP proxy. You can sign up at IPRoyal.
curlinstalled (usually preinstalled; if not, install via your package manager).- Python 3 and
pipfor running automation scripts. - Basic familiarity with the terminal.
Step 1: Retrieve Your IPRoyal ISP Proxy Details
- Log in to your IPRoyal dashboard.
- Navigate to the ISP Proxies section.
- Note the following details for each proxy:
- Host: e.g.,
YOUR_PROXY_HOST(this is a placeholder; use the actual host from your dashboard). - Port: e.g.,
YOUR_PORT. - Username: your proxy username.
- Password: your proxy password.
- Host: e.g.,
- IPRoyal may provide a list of multiple static IPs. For this tutorial, we'll use one proxy, but you can repeat the steps for others.
Note: IPRoyal supports HTTP, SOCKS5, and Shadowsocks for many proxy types. For ISP proxies, HTTP and SOCKS5 are the most common. Check your dashboard for the exact protocols available.
Step 2: Test the Proxy with curl
Before integrating the proxy into scripts, verify it works with a simple curl request.
HTTP Proxy Test
curl -x http://username:password@YOUR_PROXY_HOST:YOUR_PORT https://httpbin.org/ip
Replace username, password, YOUR_PROXY_HOST, and YOUR_PORT with your actual credentials.
SOCKS5 Proxy Test
curl --socks5 username:password@YOUR_PROXY_HOST:YOUR_PORT https://httpbin.org/ip
If successful, the response will show the proxy's IP address, not your local IP.
Step 3: Configure Environment Variables for CLI Tools
Many Linux command-line tools respect proxy environment variables. You can set them temporarily for a session or permanently in your shell profile.
For HTTP/HTTPS Proxies
export http_proxy="http://username:password@YOUR_PROXY_HOST:YOUR_PORT"
export https_proxy="http://username:password@YOUR_PROXY_HOST:YOUR_PORT"
Some tools require uppercase variables as well:
export HTTP_PROXY="http://username:password@YOUR_PROXY_HOST:YOUR_PORT"
export HTTPS_PROXY="http://username:password@YOUR_PROXY_HOST:YOUR_PORT"
For SOCKS5 Proxies
export all_proxy="socks5://username:password@YOUR_PROXY_HOST:YOUR_PORT"
For tools that support SOCKS5 directly, you can also use:
export http_proxy="socks5://username:password@YOUR_PROXY_HOST:YOUR_PORT"
export https_proxy="socks5://username:password@YOUR_PROXY_HOST:YOUR_PORT"
To make these persistent, add the lines to ~/.bashrc or ~/.zshrc and restart your shell.
Step 4: Use IPRoyal ISP Proxies with Python for SEO Monitoring
Python is ideal for automating SEO monitoring tasks, such as checking rankings or fetching data from search engines. We'll use the requests library.
Install Required Packages
pip install requests
# For SOCKS5 support, also install:
pip install requests[socks]
Basic Python Script with HTTP Proxy
import requests
proxy = 'http://username:password@YOUR_PROXY_HOST:YOUR_PORT'
proxies = {
'http': proxy,
'https': proxy,
}
try:
response = requests.get('https://httpbin.org/ip', proxies=proxies, timeout=10)
print(response.json())
except requests.exceptions.RequestException as e:
print(f'Request failed: {e}')
Basic Python Script with SOCKS5 Proxy
import requests
proxy = 'socks5://username:password@YOUR_PROXY_HOST:YOUR_PORT'
proxies = {
'http': proxy,
'https': proxy,
}
try:
response = requests.get('https://httpbin.org/ip', proxies=proxies, timeout=10)
print(response.json())
except requests.exceptions.RequestException as e:
print(f'Request failed: {e}')
Integrating with an SEO Monitoring Workflow
For actual SEO monitoring, you would replace https://httpbin.org/ip with a search engine query or an SEO API endpoint. Since search engines often block automated queries, consider using a dedicated SEO data provider API that accepts proxy configuration. The key is that all requests go through your IPRoyal ISP proxy, ensuring a consistent IP for each monitoring session.
Step 5: Rotate Between Multiple ISP Proxies (Optional)
If your IPRoyal plan includes multiple ISP proxies, you can rotate between them to distribute requests. This is useful if you want to avoid overloading a single IP.
import itertools
import requests
# List of proxy URLs from your IPRoyal dashboard
proxy_list = [
'http://user:pass@YOUR_PROXY_HOST1:YOUR_PORT1',
'http://user:pass@YOUR_PROXY_HOST2:YOUR_PORT2',
'http://user:pass@YOUR_PROXY_HOST3:YOUR_PORT3',
]
for proxy in itertools.cycle(proxy_list):
proxies = {'http': proxy, 'https': proxy}
try:
response = requests.get('https://httpbin.org/ip', proxies=proxies, timeout=10)
print(f'Using {proxy}: {response.json()}')
except Exception as e:
print(f'Error with {proxy}: {e}')
Troubleshooting
- Authentication errors: Double-check your username and password. IPRoyal may require you to whitelist your IP or use authentication; ensure you're using the correct method.
- Connection timeouts: Verify the host and port. Check if your network firewall blocks outbound connections on the proxy port.
- SOCKS5 issues in Python: Ensure
requests[socks]is installed. You can test withpip show requests[socks]. - Environment variables not working: Some applications ignore proxy environment variables. Use command-line flags (like
curl -x) or configure the proxy in the application's settings. - IP not changing: ISP proxies are static by design. If you need rotation, use multiple ISP proxies as shown in Step 5, or consider IPRoyal's residential proxies for rotating IPs.
Summary
You've learned how to set up IPRoyal ISP proxies on Linux for SEO monitoring. By using static ISP proxies, you maintain consistent IP addresses that are less likely to be flagged during long monitoring sessions. We covered retrieving credentials, testing with curl, configuring environment variables, and scripting with Python. For more advanced needs, explore IPRoyal's residential or datacenter proxies, which support rotating IPs and broader protocol options including Shadowsocks. Always refer to your IPRoyal dashboard for the most accurate endpoint and authentication details.