,

DNS Filtering, URL Filtering and Secure Web Gateways

DNS policies act on name resolution, while web gateways can inspect supported web requests. Understand where encrypted traffic changes visibility.

Read in: English · తెలుగు · हिन्दी · Français · Español

Sign in to save

A web request passes separate DNS-name and secure web gateway inspection stages with different visibility.

Blocking a malicious domain name is useful, but it is not the same as inspecting a web request. DNS filters decide whether selected names should resolve. URL filters make decisions about web destinations, and Secure Web Gateways can apply identity, content and malware rules to traffic that passes through them. Understanding where each control operates is essential when browsers use HTTPS, devices leave the office and employees access cloud services.

One website, two paths and three security decisions

Consider an employee opening an HTTPS website at https://portal.example.org/docs. The same host also offers https://portal.example.org/download/suspect. The organization permits the documentation page but needs to restrict the second path after investigating the download.

Both URLs use the same hostname. A DNS query for portal.example.org does not carry the /docs or /download/suspect paths, so a DNS filtering policy cannot distinguish them from that lookup alone. If DNS policy blocks the entire hostname, neither page is reachable by clients that depend on the protected DNS response. If it allows the name, the DNS decision says nothing about the safety of either path.

A web control that can inspect the complete HTTP request may distinguish the paths. With ordinary HTTPS, that normally requires an inspection service that terminates and re-establishes TLS, or an endpoint or browser integration with the required request visibility. A web gateway might additionally scan the downloaded file or invoke an appropriate isolation policy. These are separate controls with distinct prerequisites.

DNS filtering and SWG inspection are different stagesIllustrative flow: a blocked DNS lookup ends before any connection starts.TechiesJournal original conceptual technical diagram reconstructed from editorial-approved Article 6 Notion illustration concept. November 2026. Documentation-based, not actual captured traffic. Sources include AWS Route 53 Resolver DNS Firewall and Cloudflare Gateway documentation. Not byte-identical to Notion SVG.DNS filtering and SWG inspection are different stagesIllustrative flow: a blocked DNS lookup ends before any connection starts.Stage 1: DNS decisionClient lookupportal.example.orgProtected DNS filterDomain query and typeAllow / block / alertDNS responseStage 2: web connection, only if client continuesHTTP(S) requestafter name resolutionHTTP / SWG policyURL and content if visibleOrigin or blockbased on policy decisionNo guarantee that every deployment has both stages or can inspect decrypted HTTP.TechiesJournal
Accessible text alternative for this figure

Stage 1 is a DNS decision. A client lookup for portal.example.org goes to a protected DNS filter, which looks at the domain query and type and returns an allow, block or alert DNS response.

Stage 2 is a web connection that happens only if the client continues. An HTTP or HTTPS request after name resolution reaches HTTP and secure web gateway policy, which sees the URL and content if visible, and the origin is either reached or blocked based on the policy decision.

Not every deployment has both stages or can inspect decrypted HTTP. The diagram is conceptual and not a measured packet trace.

Figure 1. DNS lookup enforcement and HTTP/SWG inspection are distinct stages. This conceptual flow is not a measured packet trace.

This difference explains why an organization can report that DNS protection is enabled and still have gaps in web-content inspection. No single layer sees the entire interaction by default.

Security layerCommon information it can evaluateDecision it can makeWhat it does not inherently see
DNS resolver policyRequested name, DNS record type, resolver identity and supported response metadataAnswer normally, block, alert or provide a configured alternate responseURL path, HTTP method, authenticated web session or page content
Network/hostname controlAddress, port, supported hostname signals, endpoint identity or destination reputationAllow, deny or monitor a connectionThe whole encrypted request or response body
HTTP/HTTPS web inspectionSupported URL path, method, headers, files, content and user/device attributesAllow, block, isolate, scan or apply a configured content policyTraffic that avoids its inspection path or uses unsupported protocols
Application authorizationUser identity, account ownership, transaction intent and application statePermit or deny a business operationEnterprise-wide web reputation unless integrated with another control

An endpoint protection product may offer hostname filtering without running every request through a traditional cloud proxy. Conversely, a Secure Web Gateway may use DNS-based decisions as an early layer before supported HTTP inspection. The capabilities overlap, but their enforcement positions are not identical.

How DNS filtering makes a decision

A typical client queries a configured resolver for the address of a hostname. A filtering resolver or policy service examines the requested DNS name against allowlists, blocklists, threat intelligence, content categories or supported anomaly-detection rules. It may return an address, deny the lookup or produce a response indicating that no usable address is available.

In an AWS VPC, Route 53 Resolver DNS Firewall evaluates queries that pass through the associated VPC Resolver. A DNS Firewall rule group must be associated with the VPC to apply its rule sequence. AWS documents that the product filters domain names, not the IP address ultimately resolved, and does not filter HTTPS, SSH or other non-DNS application protocols.

A conceptual request path is:

Application requests a hostname
            |
Device / workload DNS configuration
            |
Approved recursive resolver
            |
DNS rule groups and threat evaluation
            |
ALLOW: continue normal resolution
ALERT: permit and record the match
BLOCK: return configured blocked response
            |
Client may attempt a network connection
only if resolution and local state permit it

The final step is conditional. A device might already have the address cached. Some software uses a different resolver, a previously established connection or a literal IP address. A resolver policy controls requests it actually receives, not every possible connection to a service.

What a blocked DNS response means

The DNS response is itself part of the user experience. In AWS DNS Firewall, a configured block can return NXDOMAIN, indicating the requested name does not exist, or NODATA, indicating a successful name lookup with no requested data. A rule can also return an override CNAME.

Those responses have different consequences. An application may display a name-resolution error, retry another lookup or follow the returned CNAME if configured to do so. An override destination is not proof of safe browser redirection in all circumstances. The DNS client, certificate validation and target service still influence what the user experiences.

A blocked-query log proves that the filtering resolver evaluated the query and applied a decision. It does not prove that the client never contacted an already known address by another path. Likewise, NXDOMAIN observed on the client is not sufficient evidence of a security block, because an ordinary nonexistent name can produce the same response. Correlate the query with the firewall action and rule identifier.

Caching, TTLs and domain redirects

DNS answers may be cached by operating systems, browsers, applications or intermediate resolvers. Their time-to-live values influence cache duration, but implementations can behave differently around negative answers and local caching. A policy change may not instantly affect connections that use a cached resolution or an existing transport session.

DNS redirection chains complicate policy. The originally queried hostname can be a CNAME to another domain, which in turn resolves to an address used by multiple customers. AWS DNS Firewall’s domain redirection setting supports examining the full relevant DNS redirection chain or only the original domain according to configuration. The choice affects which names the policy evaluates.

Blocking a shared CDN hostname or address can disrupt many unrelated services. Domain reputation and URL categorization are useful signals, not perfect ownership or content classifications. A legitimate hosted service may serve both safe and unsafe content, which is precisely where domain-wide decisions become coarse.

Detection rules are broader than static domain lists

A DNS service can use threat intelligence and behavioral indicators as well as explicit blocked names. AWS documents advanced DNS Firewall protections for domain-generation algorithms and DNS tunneling. These modes use provider-managed detection and configurable confidence thresholds, rather than simply matching an administrator’s explicit domain list.

A DNS tunneling detector attempts to recognize suspicious use of DNS requests as a data channel. It is not equivalent to decrypting arbitrary content or guaranteeing that all exfiltration is blocked. Legitimate services can generate unusual DNS patterns, and attackers can use channels other than DNS. The detection strategy therefore needs real traffic baselines, careful alert investigation and additional egress restrictions where risk warrants them.

URL filtering: from a domain name to a web request

URL filtering is a broad term. Some controls classify a hostname, while others evaluate the entire URL, including its path and query, when the product can inspect them. The distinction is crucial for encrypted HTTPS.

For an unencrypted HTTP request, a supported HTTP gateway can read the host, method, path and headers in the request. For HTTPS, a passive network observer cannot normally see the encrypted path or request body. It may observe a destination IP, port, DNS resolution it happens to receive or a hostname signal such as unencrypted SNI where present. These signals are not equivalent to the full URL.

For the example website, the DNS query for portal.example.org is identical whether the browser requests /docs or /download/suspect. A policy that truly distinguishes the two paths must obtain the request URL through a supported browser, endpoint or HTTP proxy inspection mechanism.

What DNS and HTTPS controls can seeThe path and body are not present in a DNS query or ordinary encrypted TLS metadata.TechiesJournal original conceptual technical diagram reconstructed from editorial-approved Article 6 Notion illustration concept. November 2026. Documentation-based, not actual captured traffic. Sources include AWS Route 53 Resolver DNS Firewall and Cloudflare Gateway documentation. Not byte-identical to Notion SVG.What DNS and HTTPS controls can seeThe path and body are not present in a DNS query or ordinary encrypted TLS metadata.DNS queryRequested hostname and record typeNo URL path /docsEncrypted DNS (DoH / DoT)Resolver query concealed in transitApproved endpoint may enforce DNS rulesTLS connection metadataIP/port and sometimes hostname signalsFull HTTPS path remains encryptedSupported decrypted HTTP inspectionMay inspect URL path and contentSubject to protocol, policy and exceptionsECH, proxy configuration, endpoint support and trust determine actual visibility.TechiesJournal
Accessible text alternative for this figure

Four boxes compare what each layer can see. A DNS query carries the requested hostname and record type but no URL path such as /docs. Encrypted DNS (DoH or DoT) conceals the resolver query in transit, and an approved endpoint may enforce DNS rules.

TLS connection metadata shows IP address, port and sometimes hostname signals, while the full HTTPS path remains encrypted. Supported decrypted HTTP inspection may inspect the URL path and content, subject to protocol, policy and exceptions.

Encrypted Client Hello, proxy configuration, endpoint support and trust determine actual visibility.

Figure 2. Encrypted DNS, hostname signals and decrypted HTTPS expose different information. Exact visibility is product- and client-dependent.

TLS inspection changes what the gateway can see

Cloudflare’s TLS inspection guidance describes a gateway terminating the connection from the client and creating a second TLS connection to the origin. The managed endpoint must trust an appropriate enterprise root certificate for the gateway-generated certificate. Once the traffic is available to the gateway as HTTP, supported URL path, header, method and body controls can operate.

This is not a harmless switch. It changes the confidentiality boundary and introduces certificate management, privacy, security-operations access and application compatibility responsibilities. Administrators need rules for which traffic is inspected, which categories are excluded, how sensitive content is handled, how logs are retained and how certificates are renewed and protected.

Certificate-pinned applications and services using mutual TLS may fail when a proxy impersonates the origin certificate to perform inspection. Cloudflare documents limitations involving certificate pinning, mTLS and Encrypted Client Hello. A deliberate do-not-inspect exception may be necessary for a business-critical application, but that exception reduces the content the gateway can analyze. The policy should then retain other enforceable controls where possible.

A gateway that sees only an HTTPS CONNECT hostname cannot be assumed to see the decrypted path. The presence of a proxy is not itself evidence that decryption is enabled.

HTTP/3, QUIC and encrypted hostname signals

Modern browsers increasingly use QUIC and HTTP/3, which usually run over UDP. An inspection architecture designed only around TCP-based HTTPS may have incomplete visibility unless its gateway or endpoint integration explicitly supports QUIC/HTTP/3, blocks unsupported paths or safely steers clients to a supported alternative.

The Cloudflare HTTP policy documentation describes HTTP/3 inspection support when its UDP proxy feature is enabled. That is a specific capability and prerequisite, not a universal property of web proxies.

Encrypted Client Hello (ECH) further limits the hostname metadata observable to intermediaries that do not participate in the appropriate decryption arrangement. Blocking ECH indiscriminately can affect compatibility and privacy. Organizations must verify browser behavior, endpoint management options and supported gateway features before asserting that SNI-based policies will work for every TLS connection.

Microsoft’s Defender network protection documentation also distinguishes web filtering capabilities across Microsoft Edge, other browsers and supported non-browser applications. In certain non-Microsoft browsers, HTTPS hostname controls are supported while full HTTPS URL-path indicators are not. The lesson is architectural: visibility can vary by client as well as by network path.

Secure Web Gateway: outbound inspection as a service

A Secure Web Gateway (SWG) applies organization-defined security policy to supported users’ or workloads’ outbound web access. Depending on its product and configuration, it may combine domain reputation, URL categories, HTTP inspection, malicious-download blocking, browser isolation, data loss prevention and identity- or device-aware policy.

An SWG differs from an inbound Web Application Firewall. A WAF typically protects an application exposed to external clients by inspecting supported inbound HTTP interactions. An SWG controls how enterprise users or workloads access external web resources. A network firewall can complement both with IP, port and routing policy, but it does not automatically provide the same HTTP content visibility.

Managed gateways often operate as part of broader Secure Service Edge platforms, sometimes alongside cloud access security brokers, zero-trust network access or remote browser isolation. These integrations can provide useful policy context. Their existence does not mean every subscriber has the same entitlement or that all HTTPS traffic is decrypted.

Four ways traffic reaches web policy

A gateway protects only traffic that passes through the relevant enforcement point. Common integration approaches include:

Connection methodHow it reaches filteringBest suited toKey weakness
Protected DNS configurationDevice or network sends DNS queries to a controlled resolverBroad early domain-level restrictionsNo inherent full URL or downloaded-file inspection
Endpoint or roaming agentClient software steers supported DNS, web or network flows to a policy serviceRemote devices away from corporate networksAgent health, enrollment, user privileges and protocol coverage
Browser/PAC or explicit proxyBrowser or application connects to a proxy selected by policy or configurationManaged web applications and browsersApps ignoring proxy configuration may bypass it
Network tunnel or gateway routeBranch or cloud traffic follows GRE, IPsec, supported private connectivity or similar insertionCentrally managed sites and workload networksRoute coverage, identity mapping and return/failure paths

These are operational patterns, not interchangeable capabilities. A roaming DNS resolver protects lookups through that resolver, while an endpoint running an HTTP inspection agent may enforce much more detailed policy. A branch tunnel can provide gateway reachability yet still require the service to associate traffic with the right user or device identity.

Cloudflare’s traffic-control overview documents DNS, network and HTTP policy surfaces. Microsoft Defender web content filtering illustrates a different model in which device-integrated protection applies selected website category controls across supported managed browsers without assuming an entire cloud HTTP proxy deployment.

Identity, device and context-based filtering

A policy that knows only an office’s public IP cannot reliably distinguish every person and device behind it. Endpoint identity, user session, device posture or gateway authentication can make rules more precise. A company might allow access to a software development repository for engineering users but restrict unapproved file-sharing sites on unmanaged devices.

The gateway must obtain those identities through a supported mechanism. When identity is missing, stale or ambiguous, a deployment needs a defined fallback instead of silently applying an overly broad permit rule. Shared devices, service accounts, machine-to-machine traffic and branch NAT can all complicate attribution.

Web categorization and identity policy can reduce exposure and support acceptable-use requirements, but they do not replace authorization inside a SaaS application. An employee permitted to access a cloud storage site is not necessarily authorized to download every document hosted there.

Encrypted DNS is a visibility question, not automatically a threat

Traditional DNS is often sent over UDP or TCP port 53 without encryption between the client and resolver. DNS over HTTPS (DoH) sends queries within HTTPS. DNS over TLS (DoT) encrypts resolver traffic over TLS, commonly using port 853. Encrypted DNS helps protect resolver queries from passive observation and manipulation on intervening networks.

For an enterprise that enforces DNS policy through a particular approved resolver, an unmanaged browser selecting a different DoH endpoint can route DNS requests around that resolver. A DNS-only network filter might then lack query visibility. This is an enforcement-path issue, not a reason to classify all DoH traffic as malicious.

The more defensible design is to make approved encrypted DNS part of enterprise policy. Cloudflare’s DoH configuration guidance documents sending DoH requests to its filtered endpoint and notes that a browser directed to another DoH provider will not receive those particular Gateway DNS policies.

Organizations may combine managed browser configuration, secure endpoint resolvers, DNS egress policy and explicit control over unapproved encrypted resolver destinations. None is universally sufficient. An application can use an embedded resolver, and blocking one port cannot suppress all DoH carried over ordinary HTTPS. A robust design confirms which DNS traffic is actually seen and protects the endpoint policy from unauthorized change.

Direct IP, caches and split DNS

A DNS-only rule does not automatically stop a client from reaching a literal address or a destination whose address is already cached. Nor does it guarantee coverage for a client that uses split DNS through a VPN or private application resolver.

Cloud workloads may resolve internal service names through private zones and public names through separate forwarding paths. A DNS filter attached to one resolver can miss queries sent to another path. Administrators should document resolver ordering, forwarding rules, source VPCs, VPN behavior and whether IPv4 and IPv6 egress controls are consistent.

The lesson is not to block all alternative resolution mechanisms without analysis. It is to ensure the protected resolver path is complete for the intended devices and to use connection-layer controls for traffic that DNS policy cannot constrain.

What attacks can these controls mitigate?

Security efficacy depends on the stage at which a threat is encountered. A malicious-domain block can prevent a client using that resolver from learning the destination address. An HTTP gateway can reject a recognized malicious download before delivering it to the endpoint, where the gateway has the necessary content visibility. An identity-aware policy can reduce access to risky categories by selected users. None of these decisions repairs a compromised browser or application.

Threat or misuseDNS-filter contributionURL/SWG contributionImportant residual risk
Phishing and malicious websitesBlock known or high-risk domains at resolutionBlock categorized or known harmful pages and supported URL pathsNewly created or legitimate compromised sites may not be classified in time
Malware command-and-controlDeny matching C2 domain lookupsBlock supported web command channels or downloadsDirect IP connections, other protocols and different DNS paths may remain
Suspicious downloadsBlock known distribution domainsInspect supported downloaded content, MIME/file metadata and threat signalsEncrypted/uninspected channels, unsupported file types and unknown malware
DNS tunneling or exfiltrationDetect selected anomalous queries when the resolver offers such rulesCorrelate web traffic and apply outbound DLP where supportedDNS detectors are not complete data-loss prevention systems
Policy-violating web categoriesDeny domains assigned to restricted categoriesApply more granular destination, user and URL rulesShared hosts, mixed content and misclassification
Web-based data leakageDomain restrictions can limit destinationsSupported HTTP content inspection and DLP can identify selected transfersUninspected TLS, other protocols and authorized but inappropriate transfers
Browser exploitationMay prevent contact with some known exploit hostsMay block known suspicious web requests and contentBrowser patching, sandboxing and endpoint protections remain essential
Unauthorized SaaS actionsLittle knowledge of the operationSome session/context controls can reduce certain risky actionsSaaS and application permissions still determine business authorization

Organizations should measure impact in terms of observed policy coverage and controlled examples, not vendor marketing percentages. A block against a known phishing hostname is useful evidence for that hostname and resolver path. It does not establish universal protection against phishing.

The operational price of inspection: privacy, latency and failures

Security services add dependencies. A DNS filtering resolver outage can interrupt name resolution. A proxy failure can deny web access or allow bypass if the system intentionally fails open. Deep inspection can add latency or break applications that expect end-to-end TLS. Overly broad content categories can block important business sites.

Route 53 Resolver DNS Firewall documents a configurable policy for cases where DNS Firewall fails to respond. The default is fail closed for associated VPCs, while fail open can be chosen when availability is prioritized. This is a failure response for the DNS security service, not a general statement that the entire VPC cannot communicate when a query is blocked.

For proxies, failure behavior can vary by client configuration, tunnel state, traffic type and explicit exceptions. A device may deny connections when the security client is unavailable, or a supported fallback may permit traffic without full inspection. Teams should evaluate such behavior against data sensitivity and business continuity objectives. Neither setting is risk-free.

TLS decryption also imposes privacy duties. Inspecting employee web traffic can reveal personal and sensitive content, especially if logs include full URLs, headers or payloads. Security teams should minimize collection, limit access, define retention and ensure any monitoring meets their organization’s privacy and legal obligations. Sensitive services may need narrowly defined no-inspect policies and different endpoint protections.

A false positive is a technical and business event

Imagine a security feed incorrectly categorizing a trusted software repository as malware. A resolver block may make the repository appear offline, while a web gateway could display a policy page or return a denial. Users may assume the service is broken rather than recognizing security policy.

A good investigation checks the specific domain or URL, policy category, matched rule, resolver or gateway identity, actual client traffic path and whether the classification is current. An exception should be narrow, time-bound when appropriate and supported by evidence. Broadly allowing an entire shared hosting domain may expose unrelated content.

How to verify what the security layers actually enforced

A functional review should use controlled, authorized test destinations and benign scenarios. Do not use an unknown malicious site or live exfiltration attempt as a casual validation method.

Evidence layerWhat to inspectWhy it matters
Client resolutionConfigured DNS server, actual lookup response, local cache state and managed DoH settingsEstablishes which resolver received the query
DNS policyQuery logs, matching domain or anomaly rule, action, association and timestampDistinguishes intentional DNS policy from an ordinary nonexistent name
Connection pathDestination IP, gateway/proxy route, VPN or endpoint agent status and protocolReveals direct routes and clients outside the protected path
TLS/HTTP inspectionDecryption status, SNI/host metadata, supported URL path, classification and HTTP policy actionEstablishes what the gateway could actually evaluate
Endpoint/application resultDownload or page outcome, endpoint alert, server response and relevant application stateShows whether the intended action occurred, rather than relying on policy logs alone

For the two-path example, confirm that /docs works and the restricted path is denied for the intended user when HTTP inspection is enabled. Repeat with an unmanaged or off-network device only in an authorized test environment to establish whether the policy applies. For DNS filtering, test a controlled blocked domain, inspect the resolver action log and separately verify that unsupported direct-IP traffic is handled by other egress controls if required.

Also test failure and recovery conditions. Confirm what happens when the approved resolver is unavailable, when an endpoint agent stops, when a proxy cannot be reached and when the gateway receives traffic from a client with an untrusted root certificate. Include both IPv4 and IPv6 where applicable, and verify browser behavior with supported HTTP/3 or QUIC settings.

A successful website block on one browser is useful but narrow evidence. Stronger assurance identifies the exact enforcement point, policy, user and protocol, then confirms that the desired behavior is repeatable across the intended population.

Choosing the right control for the right decision

DNS filtering is a cost-effective early policy boundary for many organizations because one lookup decision can prevent subsequent connections that depend on that name. It is also intentionally coarse. URL filtering is more precise when it can observe the needed part of the web request. A Secure Web Gateway combines policy, identity and additional inspection services for supported outbound traffic, but its effectiveness depends on routing, client integration, decryption choices and operational maintenance.

An organization does not need the deepest possible inspection for every session. It needs a documented reason for each enforcement layer, knowledge of which traffic that layer can see, and tests that demonstrate the intended decision without unnecessarily collecting sensitive information.

A DNS block governs name resolution. A URL rule governs an observed web destination or request. An SWG governs the supported outbound session. The security design works when those boundaries are explicit, complementary and actually enforced.

References and further reading

Report a correction

Corrections go to the editor and are never published automatically. No account needed.