---
title: Why is my app not resolving .gov domains?
description: Use a custom DNS resolver or contact the domain administrator, as some .gov domains block DigitalOcean IP ranges and prevent App Platform apps from …
product: Support
url: https://docs.digitalocean.com/support/why-is-my-app-not-resolving-.gov-domains/
last_updated: "2026-07-13"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# Why is my app not resolving .gov domains?

App Platform apps may be slow or unable to resolve `.gov` domains because the domain administrators have blocked DigitalOcean’s IP addresses. To fix this, you can contact the domain administrator or use a custom DNS resolver.

For example, if you are using the `example.gov` domain, you can use the following code to set Cloudflare’s DNS server as the resolver in your Node.js application:

`resolver.js`

```text
const dns = require('dns');

// Set Cloudflare's DNS server
dns.setServers(['1.1.1.1']);

const agent = new https.Agent({
  lookup: (hostname, options, callback) => {
    dns.lookup(hostname, options, callback);
  }
});

// Example usage with axios
axios.get('https://example.com', { httpsAgent: agent })
  .then(response => {})
  .catch(error => {})
```

We recommend using a custom DNS resolver only to query the `.gov` sites that have resolution issues. Setting the custom resolver as the default resolver for your app can cause connection issues to [DigitalOcean Managed Databases](https://docs.digitalocean.com/products/databases/index.html.md) connected to the app.

## Related Topics

[How do I fix the error "Record is managed by an App on this account, and cannot be deleted"?](https://docs.digitalocean.com/support/how-do-i-fix-the-error-record-is-managed-by-an-app-on-this-account-and-cannot-be-deleted/index.html.md): Use the app’s Settings tab to remove domains associated with App Platform apps.

[Why do I get the error “JavaScript heap out of memory” during deployment?](https://docs.digitalocean.com/support/why-do-i-get-the-error-javascript-heap-out-of-memory-during-deployment/index.html.md): Increase the heap memory by setting the environment variable NODE_OPTIONS=–max-old-space-size=4096.

[How do I fix a "permission denied for schema public" error in my dev database?](https://docs.digitalocean.com/support/how-do-i-fix-a-permission-denied-for-schema-public-error-in-my-dev-database/index.html.md): Delete the existing dev database and create a new one. Then make sure that the app deployment completes successfully.