Smart Subdomains

You can access the Smart Subdomains for the current domain by scrolling down to the Advanced Features section:

Smart Subdomains are special subdomains that return IP addresses generated by scripts. These scripts get information on the user requesting the IP address (like his/her country, network, other information) and make a decision on what IP address to return. The script linked to a smart subdomain runs every time a user requests the IP address of the subdomain. The scripts are written in PHP and run on a limited version of the PHP virtual machine.

Normal subdomains take precedence over smart subdomains, that is if you have both a normal subdomain and a smart subdomain with the same name on the same domain, GeoScaling will return the IP address of the normal subdomain, and will not execute the script inside the smart subdomain.

A script could for instance redirect users to the closest mirror based on the country or the network of the user, or to the least loaded machine, or redirect users to healthy servers when some of the servers go down.

The information that GeoScaling can send to a script is:

The script can then use any of the above items, or a combination, to choose which IP address to return to the user. Please click here for a short guide on writing smart subdomain scripts.