---
title: "What is X-Forwarded-For spoofing? Definition and examples"
description: "X-Forwarded-For spoofing is when a client sends a fake X-Forwarded-For header to hide its real IP address or to get past IP-based rate limits and location…"
canonical: "https://finic.ai/glossary/x-forwarded-for-spoofing"
last-updated: "2026-12-03"
---

# What is X-Forwarded-For spoofing?

X-Forwarded-For spoofing is when a client sends a fake X-Forwarded-For header to hide its real IP address or to get past IP-based rate limits and location rules.

Also called: XFF spoofing

## How it works

When a request passes through a proxy or load balancer, the proxy can add the `X-Forwarded-For` header with the IP address it saw. This lets the application know the original client address. The problem is that any client can also send this header with any value it likes.

If the application reads the first address in the header, or trusts the header from any source, an attacker can set it to a fake IP. Each request can claim a new address, or an address in a country that the service allows.

## Why it matters for fraud and trust

Many controls depend on the client IP: [rate limiting](https://finic.ai/glossary/rate-limiting), login lockouts, geo rules and [IP intelligence](https://finic.ai/glossary/ip-intelligence) checks. If the IP comes from a header the attacker controls, these controls break. A bot that runs [credential stuffing](https://finic.ai/glossary/credential-stuffing) can look like thousands of different users, and a blocked region can look like an allowed one.

## Warning signs

- The same connection or device sends many requests, each with a different forwarded IP.
- Forwarded addresses that are private, reserved or badly formed.
- A long chain of addresses on traffic that should come straight from your own edge.
- A forwarded IP in one country and a connection IP, time zone or device data that point to another.

## How teams defend against it

Trust only the header values that your own proxies set. Configure the edge to remove or overwrite any `X-Forwarded-For` that comes from the client, and read the address added by the last proxy that you control. Most web frameworks have a setting for the number of trusted proxy hops.

Do not use IP as the only signal. Device and network data are much harder to fake in a header and give a second view of who is really connecting.

## How Finic helps

Finic Identify uses device and network telemetry that a client cannot set in a header, to tell people, bots and AI agents apart. [Learn more](https://finic.ai/products/identify)

## Related terms

- [IP intelligence](https://finic.ai/glossary/ip-intelligence.md): IP intelligence is data about an internet address, such as its location, network owner, connection type and past abuse, used to judge the risk of a request.
- [Rate limiting](https://finic.ai/glossary/rate-limiting.md): Rate limiting caps how many requests a user, device, IP address or account can make in a set time, to slow down automated attacks and abuse.
- [Residential proxy](https://finic.ai/glossary/residential-proxy.md): A residential proxy routes internet traffic through IP addresses assigned to home connections, so automated or remote traffic looks like it comes from ordinary households.
- [VPN and proxy detection](https://finic.ai/glossary/vpn-detection.md): VPN and proxy detection identifies when a user connects through a service that hides their real IP address, such as a VPN, proxy or Tor, so the risk can be judged correctly.
- [Bot detection](https://finic.ai/glossary/bot-detection.md): Bot detection is the set of methods used to tell whether a website or app visitor is a person or an automated program, and often which kind of program it is.
