I have my site deployed to Vercel, and have set the DNS entries as Proxied
.
| Type | Name | Content | Proxy Status | TTL |
|-------|-------------|----------------------|--------------|------|
| A | api | ---.--.--.-- | Proxied | Auto |
| A | development | ---.--.--.-- | Proxied | Auto |
| A | example.com | --.--.--.-- | Proxied | Auto |
| CNAME | dev | cname.vercel-dns.com | Proxied | Auto |
| CNAME | www | cname.vercel-dns.com | Proxied | Auto |
When Vercel builds a project, the final step of the build process is to issue an SSL certificate. As part of this step Vercel makes an HTTP request to <domain>/.well-known/acme-challenge
. If this HTTP request gets redirected to HTTPS, Vercel will fail to issue an SSL certificate.
So I’ve added the following page rules and in Edge Certificates
I have set Always Use HTTPS
as disabled.
When I run
curl http://example.com/.well-known/acme-challenge -I
I get HTTP/1.1 404 Not Found
which means vercel has been configured correctly.
However, when I try to run on the dev
subdomain as so
curl http://dev.example.com/.well-known/acme-challenge -I
I get HTTP/1.1 301 Moved Permanently