You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure网站添加子域名时无法验证域名所有权问题咨询

Troubleshooting Azure Custom Domain (www Subdomain) Verification Issue with Cloudflare

Hey there! Let’s work through this problem together—since your root domain is already accessible, we know the foundational setup is solid, so let’s zero in on why the www subdomain verification is failing even after adding the CNAME in Cloudflare. Here are the most common fixes to check:

1. Double-Check Your Cloudflare CNAME Record Details

First, make sure your CNAME entry in Cloudflare is configured correctly:

  • Hostname: It should be just www (not www.yourdomain.com or any full domain string).
  • Target: Copy-paste the exact CNAME target provided by Azure (usually in the format <your-app-service-name>.azurewebsites.net). Even a tiny typo (like missing a character or extra dot) will break verification.
  • Proxy Status: This is the most frequent culprit! If Cloudflare’s orange cloud (proxy mode) is enabled for this record, Azure can’t resolve the true CNAME value because Cloudflare masks it with its own proxy IP. Switch this to DNS Only (gray cloud) temporarily, complete the Azure verification, then you can switch back to proxy mode afterward.

2. Verify the CNAME Record is Propagated

Before retrying in Azure, confirm the record is live across DNS servers:

  • Use command-line tools to check:
    • Run nslookup www.yourdomain.com and look for the CNAME entry matching your Azure app service domain.
    • Or use dig www.yourdomain.com CNAME for more detailed DNS info.
  • If the record doesn’t show up, wait for DNS propagation (TTL settings can cause delays—usually 5-15 minutes, but sometimes longer). You can also clear your local DNS cache (e.g., ipconfig /flushdns on Windows, sudo dscacheutil -flushcache on macOS) to test immediately.

3. Confirm Azure’s Verification Setup

Make sure you’re following the right steps in Azure:

  • On the App Service’s Custom Domains page, select Add custom domain, enter www.yourdomain.com, and choose CNAME as the record type (don’t accidentally pick A record, which is for root domains).
  • If you’ve tried verifying this domain before, delete any failed attempts from Azure’s domain list first, then restart the verification process.

4. Rule Out Cloudflare Interference

Check for other Cloudflare settings that might block verification:

  • Temporarily disable any Page Rules or Redirect Rules that target the www subdomain (e.g., auto-redirects to the root domain). These can interfere with Azure’s ability to validate the record.
  • Confirm your domain’s name servers are fully pointing to Cloudflare—if you’re using a mix of Cloudflare and other DNS providers, records might not sync correctly.

Once you’ve checked these points, retry the verification in Azure. In most cases, disabling Cloudflare’s proxy for the www record temporarily will resolve the issue.

内容的提问来源于stack exchange,提问作者Cami Rodriguez

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 03:42:47