WebTools

307 Useful Tools & Utilities to make life easier.

Dns Lookup

Online dnslookup is a web based DNS client that queries DNS records for a given domain name.

Comprehensive Guide to the DNS Lookup Engine

The DNS Lookup tool provides developers, network administrators, and domain owners with a streamlined interface for inspecting the Domain Name System (DNS) records associated with any specific domain name. By interfacing with an internal routing mechanism, this tool pulls raw DNS resolution data and systematically categorizes it into readable blocks. Let's explore exactly how the frontend logic processes your requests and maps out the digital footprint of a given URL.

How the Query Processor Works

At its core, this utility is powered by an Alpine.js component (window.bitflanDnsLookup) that binds directly to the domain input field. When you submit a domain, the tool first checks to ensure the input is not empty—halting the request and triggering an empty alert if it is. If the global application settings have reCAPTCHA enabled, it will also halt execution if a valid captcha token is missing.

Once validation passes, the frontend sets a loading state, which triggers a premium loading card UI, and makes a standard HTTP GET request to the application's internal API endpoint: /dnsLookup?url={domain}. Unlike tools that might poll for results or open web sockets, this application waits for a synchronous JSON response from the server containing the aggregated DNS zone data.

If the server responds with a status code of 200 and a JSON payload containing type: 'success', the script parses the enclosed message object. If the server returns a non-200 status code, indicating the domain could not be resolved or the query failed, the tool immediately toggles an unknownDomain error state, alerting you that the domain is unrecognized.

Supported DNS Record Types

The backend API aggregates several fundamental DNS record types and delivers them in a unified JSON structure. The frontend strictly expects specific array structures for each record type, rendering them conditionally if they exist:

  • A Records (IPv4): The tool loops through the data.a.data array, rendering the ip property to show the IPv4 address mapping.
  • AAAA Records (IPv6): Similar to the A record, the tool iterates over data.aaaa.data to display next-generation ipv6 address targets.
  • MX Records (Mail Exchange): Responsible for routing email. The tool iterates over data.mx.data, specifically pulling out the target server and its associated priority (pri), which indicates the order in which mail servers should be attempted.
  • NS Records (Nameservers): Displays the authoritative servers for the domain by reading the target from the data.ns.data array.
  • SOA Record (Start of Authority): Unlike array-based records, the SOA data is expected as a single object containing deeper meta-information. The UI specifically maps out the Admin Email (email), Serial Number (serial), Refresh Interval (refresh), Retry Interval (retry), Expiry Limit (expire), and Minimum TTL (minimum_ttl).
  • TXT Records (Text): Often used for SPF, DKIM, and site verification. The tool iterates over data.txt.data to print out the raw txt string.

It is important to note that for every single record category mentioned above, the API also returns the DNS Class and TTL (Time to Live), which are prominently displayed in the header of each respective results card.

A Concrete Worked Example

Suppose you enter the domain servdd.life into the input field and hit submit.

The Alpine.js script constructs a fetch request to /dnsLookup?url=servdd.life. Assuming the backend resolves this domain successfully, it might return a JSON payload resembling this:

{
  "type": "success",
  "message": {
    "a": { "ttl": 300, "class": "IN", "data": [{ "ip": "192.0.2.1" }] },
    "mx": { "ttl": 3600, "class": "IN", "data": [{ "pri": 10, "target": "mail.servdd.life" }] }
  }
}

The frontend script assigns this object to its local data variable. The UI reacts instantly: the loading animation fades out, and the A Record card appears showing the IPv4 address 192.0.2.1 with a TTL of 300. The MX Record card also generates, displaying a priority of 10 pointing to mail.servdd.life. Because AAAA, NS, SOA, and TXT objects were omitted from the backend response in this specific scenario, those HTML blocks remain entirely hidden thanks to Alpine's x-if directives.

Clipboard Data Export

The tool includes robust copying functionalities built directly into the UI state. Users can click the copy icon next to any individual DNS value (like a specific IP or TXT string), which triggers the copyText() function to push that specific text to the system clipboard via the navigator.clipboard.writeText API. Alternatively, the "Copy JSON Records" button in the main header invokes the copyAll() method. This stringifies the entire underlying this.data JSON object with a 2-space indentation, allowing developers to instantly export the complete, raw lookup results for use in scripts or reports.

Frequently Asked Questions

What happens if I try to lookup an unregistered or invalid domain?

If the domain does not exist or the DNS resolution fails entirely, the internal backend endpoint will return an HTTP error status (such as 404 or 500) rather than a 200 OK. The frontend script catches this non-200 status and sets the unknownDomain flag to true, which instantly renders a red alert box stating that the domain is unknown.

Does the tool make separate requests for every record type?

No. The frontend executes exactly one GET request to the /dnsLookup endpoint. The backend server is responsible for resolving all queried record types (A, AAAA, MX, NS, SOA, TXT) and bundling them into a single, comprehensive JSON object returned to the browser.

Why aren't some record cards showing up for my domain?

The frontend uses conditional rendering (x-if="data.recordType && data.recordType.data") for every category. If your domain does not have a configured IPv6 address, for instance, the backend will not return an array for AAAA records, and the Alpine.js component will gracefully hide the AAAA card from the user interface.

Is a CAPTCHA required for every lookup?

This depends on the global application configuration. If both recaptchaEnabled and toolRecaptchaEnabled are toggled on by the administrator, the form submission script intercepts your click. It explicitly checks grecaptcha.getResponse().length, and if empty, blocks the lookup until the challenge is completed.

Contact

Missing something?

Feel free to request missing tools or give some feedback using our contact form.

Contact Us