Skip to content

🌏 Geolocation based Resources

πŸ“ Overview

Note

EdgeHit DNS determines the client's geolocation based on the source IP address of the incoming DNS query. However, if a client uses a public DNS resolver (e.g., 8.8.8.8 from Google Public DNS), the authoritative DNS server only sees the resolver node’s unicast IP, not the actual client’s IP.

Public DNS resolvers like Google operate with anycast IPs for receiving queries (e.g., 8.8.8.8), but use unique unicast IPs per node when making recursive queries to authoritative DNS servers. This behavior makes GeoIP-based routing approximate, as it maps the resolver’s location, not the end

Tip

EdgeHit DNS does not support EDNS Client Subnet (ECS), it cannot see the original client’s subnet. Therefore, location-based DNS responses depend on how close the user is to the resolver node that queries your server.

EdgeHit support Geolocation Tagging in certain resources for the purpose of:

  • Serve different content in different regions:
    • Legal, cultural, or licensing constraints may require serving alternate versions of content. GeoIP allows DNS to route users to the appropriate regional version.
  • Fine-tune edge-to-origin routing:
    • DNS responses can direct users to the closest edge node, which in turn may have optimized routes to different origin servers based on region. This reduces latency and avoids cross-continental backhaul.
  • Load balancing across regional infrastructure:
    • CDNs often operate multiple PoPs (points of presence) per region. Geo-based DNS enables dynamic or static load distribution to prevent overloading a single PoP.
  • Improved fault isolation and disaster recovery:
    • In the event of a regional outage, GeoIP-aware DNS can reroute traffic away from the affected zone while preserving performance elsewhere.


There are Geolocation option for different Resources. Each serve different purposes in EdgeHit. For instance:

testing.game23.top. IN  CNAME  testing.game23.top.EdgeHit DNS-ops.top.
The DNS Record above is controlled by Geolocation for DNS Record


default.traffic-policy.EdgeHit DNS-ops.top.  IN  A      102.140.93.45
default.traffic-policy.EdgeHit DNS-ops.top.  IN  A      102.140.93.43
The DNS Record above is controlled by Geolocation for Traffic Policy



πŸ—‚οΈ Geolocation for DNS Record

This configuration is available at:
Home > DNS > Domain > Details > Records > Edit

pic

This GeoIP setting is used to control which DNS record is served to a client based on the client's geographic location, determined by the source IP address of their DNS resolver.

For example:

  • A CNAME or A record tagged with Asia > Malaysia will only be served to clients whose DNS queries originate from resolvers located in Malaysia (according to GeoIP mapping).
  • Clients outside the specified region will not receive this record unless a fallback/default record is defined.

Tip

you can create multiple A record or CNAME record in a DNS Domain Zone and assign same Record name with different content and coresponding Healthcheck ID , that has different Geolocation to resolve the Same Domain Name to Different IP address or Traffic Policy to enable different content in different region.



🎯 Geolocation for Traffic Policy

This configuration is available at:
Home > Traffic > Policy > Details > DNS Records > Edit

pic

A Traffic Policy can contain multiple A records, each pointing to different EdgeHit instances. By assigning specific geolocations to each A record, you gain fine-grained control over which EdgeHit instance IP will be returned based on the geographic location of the client's DNS resolver.

For example:

  • An A record in Traffic Policy tagged with Asia > Malaysia will only be served to clients whose DNS queries originate from resolvers located in Malaysia (according to GeoIP mapping).
  • Clients outside the specified region will not receive this record unless a fallback/default record is defined.