# Proxy protection on sub-domains managed through Netlify

**URL:** <https://answers.netlify.com/t/proxy-protection-on-sub-domains-managed-through-netlify/30942>\
**Category:** Features\
**Tags:** netlify-dns-https-ssl\
**Created:** [January 24, 2021, 3:55am UTC](https://answers.netlify.com/t/proxy-protection-on-sub-domains-managed-through-netlify/30942 "2021-01-24T03:55:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![maggie0002](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/maggie0002/32/21233_2.png) [@maggie0002](https://answers.netlify.com/u/maggie0002)\
**Post date:** [January 24, 2021, 3:55am UTC](https://answers.netlify.com/t/proxy-protection-on-sub-domains-managed-through-netlify/30942/1 "2021-01-24T03:55:20Z")

</div>

Hi,

I have enabled some sub-domains through the Netlify DNS control panel that forward to an IP address of another server. When I ping the subdomain address, I see the actual IP address of the servers. If I was doing this through the Cloudflare DNS I would have the option of proxying these subdomains for protection. Is there a way to achieve this through the Netlify DNS management system?

I have read the article on why you don’t need Cloudflare ([Why You Don't Need Cloudflare with Netlify](https://www.netlify.com/blog/2017/03/28/why-you-dont-need-cloudflare-with-netlify/)) but it doesn’t appear to be relevant to sub-domains.

---

<div class="post-metadata">

**Author:** ![luke](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/luke/32/39_2.png) [@luke](https://answers.netlify.com/u/luke)\
**Post date:** [January 26, 2021, 8:26am UTC](https://answers.netlify.com/t/proxy-protection-on-sub-domains-managed-through-netlify/30942/2 "2021-01-26T08:26:03Z")

</div>

Hi, @maggie0002. If you were doing this with Netlify DNS, the solution to proxy to another service from our CDN would work like this:

1. Create a site at Netlify.
2. Add the domain names to the site under Site Name \> Settings \> Domain management \> Custom domains.
3. Write [proxy redirect rules](https://docs.netlify.com/routing/redirects/rewrites-proxies/) for the site for those domain names.

Note, using Netlify DNS isn’t required. You can also use third-party DNS (like Cloudflare’s DNS). If you do move to Cloudflare for DNS, you can still host the sites at Netlify using that domain but there are important considerations which are covered in the support guide below:

> [@\[Support Guide\] What problems could occur when using Cloudflare in front of Netlify?](https://answers.netlify.com/t/support-guide-why-isn-t-my-ssl-certificate-provisioning-automatically-with-cloudflare-netlify-are-there-other-problems-with-using-cloudflare-in-front-of-netlify/138):
>
> Last reviewed by Netlify Support - August, 2023 Note: We recommend not using both Cloudflare’s CDN (“Accelerate and Protect”, the orange cloud in their UI) and Netlify for the same site at the same time. Why? Read on! Netlify’s web service is not designed to work optimally with another CDN “in front of” our CDN. [Proxying to our service is in general not supported](https://answers.netlify.com/t/support-guide-why-not-proxy-to-netlify/8869) and we advise you not to do it for best hosting results. Cloudflare has made similar statements that it doesn’t recommend this usa…

To summarize, you must either not proxy for the domains hosted at Netlify (but you could proxy for sites hosted outside of Netlify which were using subdomains of that domain) or bring your own SSL certificate if you decide to use their proxy feature.

If there are other questions about this, please let us know.

---

<div class="post-metadata">

**Author:** ![maggie0002](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/maggie0002/32/21233_2.png) [@maggie0002](https://answers.netlify.com/u/maggie0002)\
**Post date:** [January 26, 2021, 7:50pm UTC](https://answers.netlify.com/t/proxy-protection-on-sub-domains-managed-through-netlify/30942/3 "2021-01-26T19:50:33Z")

</div>

To clarify:

This is the feature I am trying to achieve, as found on CloudFlare:

```
7. (Optional) Some record types such *A* , *AAAA* , and *CNAME* allow a customer to toggle the Cloudflare proxy on or off. For the **Cloudflare Proxy Toggle:**

* An *orange cloud icon* proxies traffic through Cloudflare for the DNS record **Name**.
* A *grey cloud icon* ensures traffic for the DNS record **Name** is not proxied to Cloudflare. Cloudflare still serves DNS for a grey clouded DNS record, but no other Cloudflare features such as SSL, page rules, caching, WAF, etc are applied.

Grey cloud icons for *A* , *AAAA* , or *CNAME records* will expose your origin IP address to attackers and allows them to attack your origin IP address directly even if you later proxy traffic to Cloudflare. Direct attacks to your origin IP are only mitigated by asking your hosting provider to change your origin IP address.

```

Source: [https://support.cloudflare.com/hc/en-us/articles/360019093151-Managing-DNS-records-in-Cloudflare](https://support.cloudflare.com/hc/en-us/articles/360019093151-Managing-DNS-records-in-Cloudflare)

And I can achieve this through redirects? I can’t see a reference to something that would allow this other than one about a single file redirect ([Rewrites and proxies | Netlify Docs](https://docs.netlify.com/routing/redirects/rewrites-proxies/#proxy-to-another-service)). Presumably this won’t work the same?

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [February 1, 2021, 7:02pm UTC](https://answers.netlify.com/t/proxy-protection-on-sub-domains-managed-through-netlify/30942/5 "2021-02-01T19:02:20Z")

</div>

hey @maggie0002 - as mentioned above already, if you’d like to have the feature you are describing, that won’t work on our services - but the information you need to make this happen via cloudflare is included in that guide 🙂
