Curl -I www.subdomain.com doesn't work, but

Hi folks,

TLDR: root and subdomain seems to work, but curl -I command doesn’t for the subdomain.

I have a Rails app hosted on Heroku and just set up Heroku custom domains for both a subdomain (www.example.com) and root domain (example.com). Both statuses are up and running and look okay. My domain registrar is Google Domains, however they don’t have root custom domain support so I now use Cloudflare for DNS.

I created two CNAME records for both the subdomain and root domain and when I try to access the site via different combinations on the web (e.g. check http to https redirection), it looks like it works just fine.

When I try to run curl -I example.com for the root domain, it works.
Now when I try to run curl -I www.example.com for the subdomain, it does not work.

Why is this the case?

Thanks for your help.

That’s not really a subdomain, unless you’re considering ‘www’ to be the subdomain. But if it works in the browser, I wouldn’t sweat it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.