---
title: Use cases
description: This page lists common scenarios where DNS records should be proxied or set to DNS only, and describes aspects to keep in mind depending on your configuration. For background on how proxy status works, refer to Proxy status.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/dns/proxy-status/use-cases.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Use cases

This page lists common scenarios where DNS records should be proxied or set to DNS only, and describes aspects to keep in mind depending on your configuration. For background on how proxy status works, refer to [Proxy status](https://developers.cloudflare.com/dns/proxy-status/).

## Proxied records

You should proxy all A, AAAA, and CNAME records that serve HTTP or HTTPS web traffic. This includes records for:

* Your website or web application (for example, `example.com`, `www.example.com`)
* Subdomains that serve web content (for example, `blog.example.com`, `app.example.com`)
* API endpoints that accept HTTP/HTTPS requests and do not require origin IP validation

Proxied records benefit from [DDoS protection ↗](https://www.cloudflare.com/learning/ddos/what-is-a-ddos-attack/), [caching](https://developers.cloudflare.com/cache/), [WAF](https://developers.cloudflare.com/waf/), and other Cloudflare security and performance features.

When traffic is proxied through Cloudflare, the following behaviors apply. You may need to adjust your origin configuration, depending on your use case.

### Source IP changes

Your origin server sees Cloudflare IP addresses as the source of all requests instead of the end-user's IP address. Applications that rely on the source IP for authentication, rate limiting, or geolocation will not function as expected without additional configuration.

Cloudflare includes the original visitor IP address in the [CF-Connecting-IP](https://developers.cloudflare.com/fundamentals/reference/http-headers/) and `X-Forwarded-For` request headers. Configure your origin server to read the visitor IP from these headers. For more information, refer to [Restoring original visitor IPs](https://developers.cloudflare.com/support/troubleshooting/restoring-visitor-ips/restoring-original-visitor-ips/).

### Client certificate (mTLS) validation

When a record is proxied, TLS terminates at Cloudflare's global network. Cloudflare establishes a separate TLS connection to your origin server. This means the origin never receives the end-user's client certificate during the TLS handshake. You can achieve mTLS through the following:

* [Client certificates (mTLS)](https://developers.cloudflare.com/ssl/client-certificates/): validate client certificates between your end-users and Cloudflare.
* [Authenticated Origin Pulls](https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/): Verify that traffic reaching your origin comes from Cloudflare.
* [Forward a client certificate](https://developers.cloudflare.com/ssl/client-certificates/forward-a-client-certificate/): Forward client certificate details to your origin via HTTP headers.

### Header modifications

Cloudflare adds and modifies HTTP request headers when proxying traffic, including headers for [visitor IP identification](https://developers.cloudflare.com/fundamentals/reference/http-headers/), diagnostics, and connection management. Applications that expect a fixed number of headers or parse headers by position instead of by name may experience errors.

For a full list of headers that Cloudflare adds or modifies, refer to [HTTP request headers](https://developers.cloudflare.com/fundamentals/reference/http-headers/).

## DNS only

The following records should be set to DNS-only because the services they support are not compatible with Cloudflare's HTTP proxy. Proxying these records causes the associated service to break.

### Email

MX records cannot be proxied. If an A or AAAA record is used exclusively for email (for example, `mail.example.com`), it should also be set to DNS-only.

Cloudflare does not proxy SMTP traffic on port `25` by default. Proxying a record that handles email traffic causes mail servers to connect to Cloudflare's IP addresses instead of your mail server. This prevents email delivery.

Use a dedicated hostname for email that is separate from your proxied web traffic hostname. If your MX record points to the same hostname as your website, Cloudflare [dynamically prepends](https://developers.cloudflare.com/dns/manage-dns-records/troubleshooting/unexpected-dns-records/#%5Fdc-mx-and-dc--subdomains) `_dc-mx` to the hostname in the response for the MX record. This ensures that mail or service traffic bypasses the Cloudflare proxy and reaches your server directly.

Note

You can proxy SMTP traffic if you have [Cloudflare Spectrum](https://developers.cloudflare.com/spectrum/) configured for [SMTP](https://developers.cloudflare.com/spectrum/reference/configuration-options/#smtp).

### Domain verification

Third-party services often require CNAME or TXT records to verify domain ownership. Proxying a verification CNAME record returns Cloudflare IP addresses instead of the expected verification target. The third-party service cannot match the response and verification fails.

Common services that require DNS-only verification records:

* Google Workspace
* AWS Certificate Manager (`acm-validations.aws`)
* Squarespace (`verify.squarespace.com`)
* Amazon Amplify

Set domain verification records to **DNS Only** until verification completes. Some services require the record to be DNS-only permanently.

### SaaS-hosted websites

If your site is hosted on a SaaS platform (for example, [Wix](https://developers.cloudflare.com/dns/manage-dns-records/reference/vendor-specific-records/#wix), Squarespace, Webflow), the platform serves your site from its own infrastructure. Proxying the DNS record pointing to a SaaS platform causes one or more of the following issues:

* **SSL errors**: Both Cloudflare and the SaaS platform attempt to terminate SSL, which causes certificate mismatches or handshake failures.
* **Redirect loops**: Both services try to redirect HTTP to HTTPS, which creates an infinite loop.
* **Broken pages or assets**: The platform rejects requests that do not come directly from the expected DNS resolution.

If your SaaS platform does not explicitly support Cloudflare's proxy, set the record to **DNS-only**. Refer to [vendor-specific DNS records](https://developers.cloudflare.com/dns/manage-dns-records/reference/vendor-specific-records/) for platform-specific guidance.

Note

Some SaaS platforms are integrated with Cloudflare through [Cloudflare for SaaS](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/). For example, Shopify uses [O2O](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/saas-customers/provider-guides/shopify/), which allows proxied records to work correctly.

### Non-HTTP services

Records used for FTP, SSH, RDP, game servers, or other non-HTTP protocols must be DNS-only. Cloudflare's proxy only handles HTTP and HTTPS traffic. Proxying these records routes the traffic to Cloudflare, which drops the non-HTTP connection.

To proxy non-HTTP protocols, use [Cloudflare Spectrum](https://developers.cloudflare.com/spectrum/).

### Other CDN or proxy providers

If a CNAME record points to another CDN or proxy provider (for example, AWS CloudFront, Akamai, Fastly), proxying it through Cloudflare can cause conflicts between the two proxies:

* **SSL negotiation failures**: Both proxies attempt to terminate TLS, which creates certificate chain errors.
* **Routing loops**: Each proxy forwards requests back to the other.
* **Connectivity errors**: The upstream CDN rejects requests from Cloudflare's IP addresses.

Cloudflare automatically [prevents proxying](https://developers.cloudflare.com/dns/proxy-status/limitations/#proxy-eligibility) for some known targets. For targets that are not automatically blocked, set the record to **DNS-only** if you experience connectivity issues.

### API and webhook origin validation

Some third-party services validate the origin IP address of incoming API calls or webhook deliveries. When you proxy the DNS record for an endpoint that sends outbound requests or receives webhooks, the remote service sees Cloudflare's IP addresses instead of your server's IP address. This causes the validation to fail.

If a third-party service requires IP-based validation and does not accept [Cloudflare's IP ranges ↗](https://www.cloudflare.com/ips/), set the record for that service to **DNS-only**.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/dns/","name":"DNS"}},{"@type":"ListItem","position":3,"item":{"@id":"/dns/proxy-status/","name":"Proxy status"}},{"@type":"ListItem","position":4,"item":{"@id":"/dns/proxy-status/use-cases/","name":"Use cases"}}]}
```
