Cloudflare integration with Azure websites
The DNS settings for your website in Cloudflare allow you to proxy traffic so that requests to example.com
and www.example.com
will be protected.
You do not control azurewebsites.net
though so you cannot proxy traffic going directly to that address with Cloudflare, which means that someone can get around the Cloudflare protection by just going to example.azurewebsites.net
What you can do to protect against this is use the IP and Domain Restrictions feature of Azure Websites to restrict traffic so your website will only respond to requests coming through Cloudflare.
Instructions for configuring your site are here: https://azure.microsoft.com/en-us/blog/ip-and-domain-restrictions-for-windows-azure-web-sites/
You can get the list of Cloudflare IPs here: https://www.cloudflare.com/ips/