Is My Net OK?

Instant internet & DNS connectivity check

Your connection right now
Checking…

What is mynetok.com?

mynetok.com is a free, lightweight API that tells you whether your internet connection and DNS resolution are working. Make an HTTP request to https://mynetok.com/check.json and get a simple JSON response:

Response
{ "ok": true }

If the request succeeds, your internet and DNS are working. If it fails, they aren't. That simple.

How it works

  1. Your device resolves mynetok.com via DNS — proving DNS works.
  2. An HTTPS connection is established — proving internet routing works.
  3. The server responds with {"ok": true} — confirming end-to-end connectivity.

Code examples

curl
curl -s https://mynetok.com/check.json
JavaScript (fetch)
fetch("https://mynetok.com/check.json")
  .then(r => r.json())
  .then(d => console.log(d.ok ? "Online" : "Offline"))
  .catch(() => console.log("Offline"));
Python
import urllib.request, json

try:
    with urllib.request.urlopen("https://mynetok.com/check.json") as r:
        data = json.loads(r.read())
        print("Online" if data["ok"] else "Offline")
except Exception:
    print("Offline")
Go
resp, err := http.Get("https://mynetok.com/check.json")
if err != nil {
    fmt.Println("Offline")
    return
}
defer resp.Body.Close()

var result struct{ OK bool `json:"ok"` }
json.NewDecoder(resp.Body).Decode(&result)
if result.OK {
    fmt.Println("Online")
}
Bash (script)
if curl -sf https://mynetok.com/check.json > /dev/null; then
    echo "Online"
else
    echo "Offline"
fi
PowerShell
try {
    $r = Invoke-RestMethod "https://mynetok.com/check.json"
    if ($r.ok) { "Online" } else { "Offline" }
} catch { "Offline" }
Ruby
require 'net/http'
require 'json'

begin
  uri = URI('https://mynetok.com/check.json')
  data = JSON.parse(Net::HTTP.get(uri))
  puts data['ok'] ? 'Online' : 'Offline'
rescue
  puts 'Offline'
end
PHP
$json = @file_get_contents("https://mynetok.com/check.json");
$data = $json ? json_decode($json, true) : null;
echo ($data && $data["ok"]) ? "Online" : "Offline";

Use cases

Frequently Asked Questions

Run curl -s https://mynetok.com/check.json in your terminal. If you get back {"ok": true}, your internet connection is working. If the request times out or fails, your internet is down.
Make an HTTP request to https://mynetok.com/check.json. Because the request requires resolving the domain name mynetok.com, a successful response proves that your DNS resolution is functioning correctly. You can also run nslookup mynetok.com to test DNS independently.
A DNS check verifies that your device can translate domain names (like mynetok.com) into IP addresses. An internet check verifies that your device can reach servers on the internet. mynetok.com tests both in a single request: DNS resolution must succeed to find the server, and internet routing must work to receive the response.
Your network link may be active but your DNS server could be unreachable or misconfigured. Try switching to a public DNS provider like 1.1.1.1 (Cloudflare) or 8.8.8.8 (Google). You can test DNS independently with nslookup mynetok.com and internet independently by pinging an IP address directly.
Send an HTTP GET request to https://mynetok.com/check.json from any programming language. If the request succeeds and returns {"ok": true}, connectivity is confirmed. If it throws an exception or times out, the connection is down. See the code examples above for curl, JavaScript, Python, Go, Bash, PowerShell, Ruby, and PHP.
Yes. mynetok.com is completely free with no authentication, no API keys, and no rate limits. You can use it in scripts, apps, CI/CD pipelines, or any automated system without restriction.
If your request to mynetok.com fails, it means either your DNS resolution is broken (the domain name cannot be resolved), your internet connection is down (packets cannot reach the server), or there is a firewall or proxy blocking the request. Check your network settings, try a different DNS server, or test with another endpoint to isolate the issue.
Yes. You can poll https://mynetok.com/check.json at regular intervals from a cron job or monitoring script. If the request fails, trigger an alert. This gives you a simple, dependency-free way to detect when your server or device loses internet connectivity.
Pinging 8.8.8.8 only tests basic IP-level connectivity — it tells you packets can reach Google's DNS server but does not verify that DNS resolution works. mynetok.com tests both DNS and HTTP connectivity in one request, giving a more complete picture of whether your internet is truly functional for real-world use (browsing, API calls, etc.).
Yes. As long as your proxy or VPN allows outbound HTTPS traffic, mynetok.com will work. A successful response confirms that your entire network path — including the proxy or VPN tunnel — is functioning correctly.