What is a Proxy Hostname?

Image of a router connected to the internet symbol. Text to the side reads

Share

IN THIS ARTICLE:

Proxy hostnames are IP addresses that are used to access the proxy server itself. They consist of two parts, namely the domain name and the port. Some hostnames do not have ports as they are included by default based on the protocol being used.

While it may be simpler to just use an IP address instead of going through a hostname, there is value in accessing a server through the hostname. This article aims to explain what a proxy hostname is, how different protocols use the hostname, and why proxy providers prefer you access proxies through the hostname.

Image of the internet logo with connections to a laptop and other similar logos. Text above reads

Proxy Hostnames Explained

A proxy hostname is an alternative to an IP address as it is the domain name portion of it. When connecting to a proxy, users can either connect through a proxy IP or a hostname. The hostname consists of two parts: the domain (or IP address) and the port.

An example of how a hostname could look like is: username:password@my-proxy:5000. In this instance, my-proxy is the domain name that, when using a DNS provider, will resolve to an IP address. You could use an IP address to bypass this but you will eventually hit the public endpoint which may be the server or a load balancer.

The domain name is just a human-readable way to interact with the target service, which in this case is the proxy server. 5000 is the port which, simply put, is the specific exit on the highway of the proxy server. If my-proxy resolves to a 1.2.3.4, then you can use 1.2.3.4:5000 to connect to the same proxy. 

A hostname hides the actual infrastructure of the proxy server from you. What this means is that a hostname allows proxy providers to upgrade, move, or reassign their servers without altering your access at all. They can apply SSL/TLS certificates (https://proxy.example.com) for encrypted tunneling. A hostname can resolve to multiple IPs, making sure you are always connected and that any changes from the backend will not affect you.

Proxy hostnames can also distribute traffic across multiple servers through the practice of load balancing, can automatically reroute you if one proxy node goes down, and provide you with a more reliable connection without manual intervention. 

Proxy hostnames are made of labels separated by commas, such as proxy, example, and com. Each label must be letters, numbers, or a dash. Each part cannot be longer than 63 characters while the entire hostname cannot exceed 253 characters. The RFC 1123 established that the hostname does not need to start with a letter and can start with numbers. Underscores are also invalid within hostnames, although they do appear in some DNS record types such as SRV. 

Image of a computer connected to a shield which is connected to a router. Text above the image reads

Proxy Hostnames and Different Protocols

Proxy hostnames work differently depending on the protocol. For HTTP proxies, you connect with the hostname and the proxy will either fetch the page for you or make a tunnel. More specifically, for HTTP, you send the full URL in the request line to the proxy. For end-to-end TLS or HTTPS, you use the CONNECT method to ask the proxy to open a TCP tunnel to target-host:port. If you secure the hop to the (HTTP) proxy, the client will validate the proxy’s TLS certificate against the proxy hostname or else the verification will fail. cURL documents this explicitly through CURLOPT_PROXY_SSL_VERIFYHOST.

For SOCKS5 proxies, the sever will resolve domains for you, removing the need for a local DNS. SOCKS5 supports an “address type = DOMAINNAME” so you can send the target domain to the proxy and let the proxy handle DNS resolution. This is why schemes like socks5h:// in clients means “resolve hostnames through the proxy”.

Applications and tools such as cURL, Python Requests, Git, and npm, let you plug in a proxy hostname directly. cURL supports both -x or –proxy to set up a proxy. An example of this would be curl -x http://user:[email protected]:8080 http://example.org. This works with HTTP, HTTPS, and SOCKS5 protocols. With HTTP proxies, it will verify the hostname against the TLS certificate. Python will use a proxy dictionary to specify the hostnames. This will look something like this:

import requests

proxies = {
    "http":  "http://user:[email protected]:8080",
    "https": "http://user:[email protected]:8080",
}
r = requests.get("https://httpbin.org/ip", proxies=proxies)

Git relies on proxies under the hood and will support proxy hostnames. Npm has both proxy and https-proxy configurations. Tools such as wget, pip, and docker will respect environment variables like this: export HTTP_PROXY=http://proxy.example.com:8080. This way, one hostname will work across multiple apps without separate configs. 

Image of three routers connected to a device with a shield floating over the main device. Text above reads

Importance of Proxy Hostnames

Hostnames do not just offer a single point of access, as they are designed to make the entire connection more adaptable. When you connect through a hostname, the underlying DNS can return multiple IP addresses for the same name. This setup will allow providers to spread requests across different servers in real time through load balancing.

By doing this, the network will avoid any bottlenecks, keep speeds more consistent, and ensure that none of the servers get overloaded. For you, it will feel seamless. You will type in one address and the system automatically decides which server will handle your request most efficiently. 

Another advantage is reliability through failover. If one of the servers tied to the hostname suddenly fails or goes offline, DNS can quickly point the connection to another available server. This automatic rerouting minimizes downtime and helps guarantee that services remain available.

The combination of flexibility, distribution, and resilience makes hostnames essential for proxy networks. They let providers maintain and upgrade their infrastructure while keeping your access uninterrupted and secure. 

Additionally, proxy hostnames make it easier to secure connections. This is because they work with SSL/TLS certificates, which providers use to encrypt the traffic between you and the proxy. This means that when you connect to something like https://proxy.example.com, the hostname is checked against the certificate to confirm you are talking to the correct server.

Without a hostname, this level of trust and validation would not be possible. You would risk connecting to the wrong machine. By combining encryption with the flexibility of DNS, hostnames offer performance and protection in a way that simple IP addresses are unable to. 

Proxy Hostname Best Practices

When it comes to proxy hostnames, avoid hardcoding IPs as you will lose flexibility and HTTPS will break if the cert does not match. Do not make names too long or use foreign symbols such as underscores; stick to dashes and nothing more. Do not expect any advanced auto-discovery methods such as SRV records as most applications just require a hostname and a port. 

Conclusion 

Proxy hostnames are a way for proxy providers to ensure their proxies are easy to connect to and easy to maintain, without affecting their customers. Proxy hostnames can provide flexibility that raw IP addresses cannot; providers can upgrade or move servers without breaking connectivity. This is true for proxy servers generally, reverse proxies, and HTTP-based proxy servers, while implementing proxy auto configuration and compatibility with clients.

Key Takeaways:

  1. Proxy hostnames are DNS-based labels that are used to access a proxy. 
  2. Proxy hostnames let providers upgrade or move servers without affecting proxy configuration or internet connectivity. 
  3. Proxy hostnames support load balancing, failover, and help in bypassing proxy setups across public proxies, private proxies, and mobile proxies.
  4. Different clients and protocols (HTTP-based proxy server, SOCKS5, reverse proxies) all depend on hostnames for stable client connections. 
  5. Hostnames help make proxy connections reliable and adaptable when compared to static IPs. 

Proxy hostnames are adaptable and help in many aspects, including load balancing and failover, keeping client connections stable, and minimizing any downtime. They are mandatory for bypassing proxy restrictions, accessing geo-blocked or region-restricted content, and supporting network admins who apply content filtering policies. The added combination of a proxy username and proxy password authentication makes hostnames the dependable choice for maintaining a reliable internet connection across devices and networks.


Frequently Asked Questions

What is my proxy hostname?

To find your specific proxy hostname, go to your proxy settings under Network Settings. For Windows, go to Settings > Network & Internet > Proxy. On macOS, go to System Settings > Network > Advanced > Proxies. There, you will find all the information about your proxy including the hostname.

Can a hostname resolve to multiple IP addresses?

A hostname can resolve to multiple IP addresses through a process called DNS Round Robin. This happens whenever multiple A or AAAA DNS records are created for the same hostname with each one pointing to a different IP.

Why does a hostname give two IP addresses?

A hostname can give two IP addresses whenever IPv4 and IPv6 addresses are on the same host, the device is connected to multiple networks at the same time, or as a result of DNS round-robin for load balancing and fault tolerance. The exact reason will depend on whether you are seeing multiple IPs for a single host or multiple IPs within a domain name.

Which characters are not allowed in hostnames?

Any non-English characters or symbols such as @, #, $, !, %, and so on. Dashes are acceptable.

What are the rules for hostnames in RFC?

Hostnames must consist of letters of numbers and hyphens separated with dots separating each section. Each section must be within 1 and 63 characters while the total hostname must not exceed 253 characters.

About the author

Zeid is a content writer with over a decade of writing experience. He has written for publications in Canada and the United States before deciding to start writing informational articles for Proxidize. He gained an interest with technology with a specific interest in proxies.
IN THIS ARTICLE:

Save Up To 90% on Your Proxies

Discover the world’s first distributed proxy network, which guarantees the best IP quality, reliability and price.

Related articles

Passive OS Fingerprinting (TCP/IP Fingerprint)

Proxy providers and users go to great lengths to protect their privacy. This extends to every piece of information that

Omar Rifai

New Era of Mobile Proxies Begins

At Proxidize, we’ve always been about innovation and pushing the boundaries of what’s possible in the proxy industry. Now, we’re

Abed Elezz

What Is an Open Proxy?

Whenever you search for free proxies, you’ll come across open proxy lists, regularly maintained by several different companies. An open

Omar Rifai

Basics of Web Scraping with Beautiful Soup

Web scraping is an important technique for extracting information from websites, allowing users to gather data efficiently and systematically. By

Zeid Abughazaleh

Start for Free! Start for Free! Start for Free! Start for Free! Start for Free! 

Talk to Our Sales Team​

Looking to get started with Proxidize? Our team is here to help.

“Proxidize has been instrumental in helping our business grow faster than ever over the last 12 months. In short, Proxidize has empowered us to have control over every part of our business, which should be the goal of any successful company.”

mobile-1.jpg
Makai Macdonald
Social Media Lead Specialist | Product London Design UK

What to Expect:

By submitting this form, you consent to receive marketing communications from Proxidize regarding our products, services, and events. Your information will be processed in accordance with our Privacy Policy. You may unsubscribe at any time.

Contact us
Contact Sales