DNSLookup.LookupHostByAddress
-----------------------------

Queries the domain name for an IP.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DNSLookup](component_DNSLookup.md) | [6.0](newinversion60.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DNSLookup.LookupHostByAddress"; IP ) 

**MBS**( **"DNSLookup.LookupHostByAddress";** /\* Queries the domain name for an IP. \*/  
**$IP**) /\* The IP address to query.e.g. "192.35.60.462" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| IP | The IP address to query. | "192.35.60.462" |

### Result

Returns reference number or error.

### Description

Queries the domain name for an IP.  
Lookup is synchronous.  
### Examples

Lookup an IP:

 Set Variable \[$q ; Value:MBS ( "DNSLookup.LookupHostByAddress"; DNS Lookup::IP to lookup )\]  
If \[MBS ("IsError") = 0\]  
 Set Field \[DNS Lookup::Name ; MBS ( "[DNSLookup.Name](DNSLookupName.md)"; $q )\]  
 Set Field \[DNS Lookup::Addresses ; MBS ( "[DNSLookup.Address](DNSLookupAddress.md)"; $q ; -1 )\]  
 Set Field \[DNS Lookup::Aliases ; MBS ( "[DNSLookup.Alias](DNSLookupAlias.md)"; $q ; -1 )\]  
 Set Variable \[$r ; Value:MBS ( "[DNSLookup.Release](DNSLookupRelease.md)"; $q )\]  
End If  
Query Apple.com IPv6 values and return JSON:

 Let ( \[  
 d = MBS ("DNSLookup.LookupHostByAddress"; "2a02:26f0:480:19f::1aca ");  
 r = MBS ("[DNSLookup.JSON](DNSLookupJSON.md)"; d);  
 e = MBS ("[DNSLookup.Release](DNSLookupRelease.md)"; d)  
\]; r )  
<small>  
Example result:   
{ "name" : "g2a02-26f0-0480-019f-0000-0000-0000-1aca.deploy.static.akamaitechnologies.com" , "address" : "2a02:26f0:480:19f::1aca" , "aliases" : \[ "a.c.a.1.0.0.0.0.0.0.0.0.0.0.0.0.f.9.1.0.0.8.4.0.0.f.6.2.2.0.a.2.ip6.arpa" \], "addrtype" : 30 , "addressList" : \[ "2a02:26f0:480:19f::1aca" \] } </small>### See also

- [DNSLookup.Address](DNSLookupAddress.md)
- [DNSLookup.Alias](DNSLookupAlias.md)
- [DNSLookup.JSON](DNSLookupJSON.md)
- [DNSLookup.LookupHostByName](DNSLookupLookupHostByName.md)
- [DNSLookup.Name](DNSLookupName.md)
- [DNSLookup.Release](DNSLookupRelease.md)
- [IsError](IsError.md)

### Release notes

- **Version 10.1**
    - Fixed bug in [DNSLookup.LookupHostByAddress](https://www.mbsplugins.eu/DNSLookupLookupHostByAddress.shtml) function when parsing IPv4.

### Example Databases

- [Network/DNS Lookup](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Network/DNS%20Lookup.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 10.1pr1](https://www.mbsplugins.de/archive/2020-01-30/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [DNS Lookups in FileMaker](https://www.mbsplugins.de/archive/2015-12-12/DNS_Lookups_in_FileMaker/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 25th November 2015 , last changed 2nd September 2025

  
[DNSLookup.List](DNSLookupList.md) - [DNSLookup.LookupHostByName](DNSLookupLookupHostByName.md)

[HTML Version](DNSLookupLookupHostByAddress.shtml)