Geofeed Print

  • 0

How to Set Up a Geofeed File

 

Introduction

A Geofeed file for IP addresses is a specialized file format used to provide geographical information about IP addresses. This can be useful for various applications, including IP-based geolocation services, fraud prevention, and location-based content delivery. This guide will walk you through the process of creating and setting up a Geofeed file for IP addresses, including examples.

 

What is a Geofeed File for IP Addresses?

A Geofeed file is an CSV or JSON file that contains location data for websites or IP addresses. This data can include geographical coordinates, addresses, and other location-specific details. Search engines and other tools use this information to understand the physical location of your business or site, improving local search visibility and relevance.

 

Steps to Create a Geofeed File for IP Addresses

 

1. Choose the File Format

Geofeed files for IP addresses can be in CSV or JSON format. Select the format that best suits your needs:

  • CSV: Simple and easy to create, suitable for straightforward data representation.
  • JSON: More flexible and better suited for hierarchical or complex data structures.

 

2. Create the Geofeed File

CSV Format

If you choose CSV, create a file named "geofeed_ip.csv". Here’s an example of how to structure the CSV file:

 

csv

prefix,country_code,region_code,city,postal_code

192.168.1.0/24,US,US-CA,San Francisco,94016

10.0.0.0/24,JP,JP-27,Osaka,530-0003

172.16.0.0/24,GB,GB-LDN,London,E17DB

 

  • Prefix: The IP address subnet with CIDR mask.
  • Country_Code: The country code associated with the IP range.
  • Region_Code: The State or Region Code associated with the IP range.
  • City: The city associated with the IP range.
  • Postal: The postal code associated with the IP range.

 

JSON Format

If you choose JSON, create a file named "geofeed_ip.json". Here’s an example of how to structure the JSON file:

 

json

[

  {

    "prefix": "192.168.0.0/24",

    "country_code": "US"

    "region_code": "US-CA",

    "city": "San Francisco",

    "postal_code": "94016",

  },

  {

    "prefix": "10.0.0.0/24",

    "country_code": "JP"

    "region_code": "JP-27",

    "city": "Osaka",

    "postal_code": "530-0003",

  },

  {

    "prefix": "172.16.0.0/24",

    "country_code": "GB"

    "region_code": "GB-LDN",

    "city": "London",

    "postal_code": "E17DB",

  }

]

 

3. Upload the File

Upload your "geofeed_ip.csv" or "geofeed_ip.json" file to your web server’s root directory or a subdirectory. Ensure that the file is accessible via a URL, such as "https://www.example.com/geofeed_ip.csv" or "https://www.example.com/geofeed_ip.json".

 

 

4. Validate Your Geofeed File

Before finalizing, validate your Geofeed file to ensure it is correctly formatted. You can use online tools or validators designed for CSV or JSON formats to check for any issues.

 

After validating, you can continue onto Step 5 and also submit your Geofeed file to Max Mind, IPinfo and others by sending them an email with the full URL to your Geofeed file.

 

 

5. Submit the Geofeed File

If you wish for us to point one or more of your leased subnets to your Geofeed file we can do this by creating a Reallocation (Recommended) or a Reassignment. To do this, email us at iplease@acedatacenter.com with the following information:

  • Reallocation
    • The full Geofeed URL
    • The IP Subnet and CIDR
    • ASN
    • The ARIN Org ID
    • Organization Name
  • Reassignment
    • The full Geofeed URL
    • The IP Subnet and CIDR
    • ASN
    • The Organization Name
    • The complete Organization Address
      • City
      • State/Province
      • Postal Code
      • Country

 

Best Practices

  • Ensure Accuracy: Verify that IP ranges and geographic location are accurate to avoid mismatches.
  • Update Regularly: Regularly update your Geofeed file to reflect any changes in IP address allocations or geographical information.
  • Check File Accessibility: Make sure the file is publicly accessible and not blocked by firewall or server settings.
  • Use ISSO 3116-1 and ISSO-3116-2 for accurate GeoLocation country and regional codes: https://en.wikipedia.org/wiki/ISO_3166-1

 

Conclusion

Setting up a Geofeed file for IP addresses can significantly enhance your ability to analyze and utilize geographical information related to IPs. By following the steps outlined in this guide, you can create, upload, and manage a Geofeed file effectively. Ensure that you regularly update and validate your file to maintain its accuracy and usefulness.

 

If you have any questions or need further assistance, don’t hesitate to contact our support team:

iplease@acedatacenter.com

(801) 900-5673

(855) 638-5577

 


Was this answer helpful?

« Back