IP address and hostname: reverse DNS explained

An IP address and hostname are linked by DNS only when the address’s administrator publishes a reverse DNS entry. To check the link, query its PTR record; the answer may be a useful server label, no name at all, or a name that says less than you expect. You can check your current public IP on Loqmi, then run a lookup in seconds.
How a reverse DNS lookup links an IP address to a hostname
Ordinary DNS starts with a hostname, such as mail.example.net, and looks for its IP address. An IPv4 address usually lives in an A record, and an IPv6 address lives in an AAAA record. Reverse DNS works the other way around. It asks whether a name has been published for an IP address.
The answer is a PTR record (pointer record). DNS stores an IP address in a special reverse namespace. For IPv4, reverse the dotted sections and add in-addr.arpa. For example, the documentation-only address 192.0.2.25 becomes 25.2.0.192.in-addr.arpa. If a PTR record exists for it, that record holds a hostname. RFC 1035 defines PTR records and the IPv4 reverse namespace; RFC 5737 reserves this example range for documentation.
IPv6 uses ip6.arpa. The full address is expanded into hexadecimal digits, then the digits are reversed and separated by dots. It is precise, though hardly a format you would want on a birthday cake. The raw result can look like DNS spilled a bowl of alphabet soup. RFC 3596 specifies this reverse mapping.
The reverse zone belongs to whoever controls the IP address block, often an ISP, hosting provider, or cloud provider. That control is separate from the domain’s forward DNS. Owning example.net is a bit like owning a street name: it does not automatically let you renumber the houses on that street, or set the PTR record for an address an ISP assigned to you.
Check a reverse DNS lookup
You can query PTR from a terminal or a lookup tool. Windows includes nslookup, while macOS and many Linux systems provide dig (availability can vary by Linux distribution).
- Windows: open Command Prompt or PowerShell and run
nslookup 192.0.2.25. - macOS or Linux: open Terminal and run
dig -x 192.0.2.25 +short.
Swap in the IPv4 or IPv6 address you’re investigating. In dig -x, the -x option builds the reverse DNS name for you; +short trims diagnostic details. Your keyboard has done enough today. On a phone, use a browser-based DNS lookup service, or find your address on Loqmi’s IP page and run the command later from a computer.
Quick self-check: compare the address shown by Loqmi with the address you queried. If you are on a VPN, the public address may be the VPN exit address, not the one your ISP assigned at home. For more context about a public address, try IP lookup.
For a local device such as a printer or laptop, a public lookup usually will not show its local name. Your router commonly uses NAT (network address translation) so devices with private home-network addresses can share one public address. It acts like a receptionist who answers every call with the same company number. Ask the router or local DNS server for a device name instead, and see public versus private IP addresses.
What the result does and does not tell you
| Result | What it means | What to do next |
|---|---|---|
| A hostname appears | The reverse DNS administrator published that name for the address. | Check its A or AAAA record if you need to confirm the mapping. |
| No PTR answer | No name was returned by the resolver. Reverse DNS is optional, so this can be normal. | If it is your server, ask the IP provider to publish a PTR record. |
| A generic or unfamiliar name | The provider may use an automated label, pool name, or internal naming scheme. | Do not treat the wording alone as proof of a person, device, or location. |
| The name resolves to another IP | The PTR and forward DNS may be out of sync, or the name may cover multiple addresses. | Check both A and AAAA records and ask the administrator if you manage the service. |
A PTR record is a label, not an identity certificate, more like a name tag on a coat than a passport. It does not prove that a computer is online, that a person owns it, or that a site is hosted there. One IP can serve several websites, and a single hostname can resolve to more than one address. Reverse DNS answers “what name was published here?” It does not answer “who is this, exactly?”
When the match matters, do a forward check too. Look up the hostname returned by PTR and see whether its A (IPv4) or AAAA (IPv6) answer includes the original IP. This is called forward-confirmed reverse DNS. It is a useful consistency check, but still not proof of good intent or organizational identity.
For email, receiving servers may use reverse DNS as one signal about a sending server. A server operator should make sure its PTR hostname points forward to the sending IP and that the mail server identifies itself consistently. A residential address with no PTR does not mean your inbox or connection is broken; it usually means that address was not set up as an outbound mail server.
Troubleshoot a missing or surprising name
When a result surprises you, use the symptom to narrow the cause. DNS is impressively literal. It returns exactly what was published, even when that is stale or unhelpful.
| Symptom | Likely cause | Practical fix |
|---|---|---|
| Blank answer for a home connection | The ISP has not published a PTR, or the address is dynamic. | Usually nothing is needed. If you run a service, ask the ISP whether it supports reverse DNS. |
| Different answers at different times | A cached DNS answer, changing IP assignment, or recently updated record. | Check again later or query another resolver; confirm which public IP you are checking. |
| Private address returns no public result | The address is only meaningful inside a local network. | Use the router or your organization’s internal DNS server. |
| PTR name is right but forward check fails | The PTR target’s A/AAAA records are missing, changed, or managed separately. | Contact whoever manages the reverse zone and hostname’s forward zone. |
If the question is whether an address is exposed through a browser or VPN, reverse DNS is the wrong test. Check the public address on how to tell whether a VPN is working and use Loqmi’s WebRTC leak test to check whether the browser reveals another address. For reputation concerns, a PTR lookup also does not show whether an IP appears on a blocklist; use the IP blacklist checker for that separate question.
Who can change a PTR record?
On a home or mobile plan, your ISP controls the reverse zone, so your domain registrar cannot add its PTR record. If a service you run needs one, contact the ISP that assigned the address and ask about its reverse DNS settings.

With a dedicated server or cloud VM, the hosting provider may offer a control panel field for reverse DNS or handle the change through support. If you control a routed IP block and its reverse zone is delegated to your DNS servers, you can manage the PTR records there. Provider instructions vary because the IP allocation and delegation determine who is authoritative. Cloudflare’s reverse-zone guide describes the prerequisites for managing a reverse zone through its service.
Choose a stable hostname that you control, and make sure it has a matching forward record where needed. If your address changes frequently, a fixed reverse name can quickly become misleading, like a shop sign on a food truck. That is one reason residential networks often use generic reverse names, or none at all. For how changing assignments work, read static versus dynamic IP addresses.
Key takeaways
- A reverse DNS lookup asks for a PTR record to find a hostname associated with an IP.
- IPv4 uses
in-addr.arpa; IPv6 usesip6.arpa. - The ISP, hosting provider, or IP-block administrator usually controls the PTR record.
- A missing or generic result is common and does not, by itself, indicate a problem.
- A hostname is useful DNS metadata, not proof of identity, safety, or physical location.
Frequently asked questions
Can a reverse DNS lookup show every website hosted on an IP address?
No. A PTR lookup returns the name published for that address in its reverse DNS zone. A server may host many websites on one IP, and those site names are usually stored in forward DNS or discovered through separate datasets. One PTR answer is not a list of all domains using the server.
How do I change the PTR record for my IP address?
Contact the ISP, cloud provider, or hosting company that assigned the IP and ask them to set its reverse DNS name. If you control a delegated reverse zone for an address block, you can manage the PTR there. The hostname should also have a matching forward A or AAAA record when your use case requires forward-confirmed reverse DNS.
Does my home router have a public hostname?
Usually, a household connection shares one public IP through NAT, while the router and devices also use private addresses on the home network. The ISP may publish a generic PTR name for the public address, but it does not identify each device behind the router. Local device names come from local network services such as DHCP or local DNS.
Can a hostname from reverse DNS reveal my exact location?
Not reliably. A provider may include a city code or facility label in a hostname, but naming conventions vary and can be stale or broad. Treat it as an operator's label, not a location record. IP geolocation databases and PTR names answer different questions, and neither should be treated as a precise street address.