Www.site.com doesn't work, but site.com works


#1

Hey there!

Relatively new to this so would appreciate some guidance!

Setting up a static website hosted with Google Buckets and using Cloudflare for SSL encryption.

When I navigate to https ://site.com it works perfectly! I also set up a rule so that when I navigate to http ://site.com it redirects you to the https version of the site.

However if you try navigating to http ://www.site.com or https ://www.site.com I get the error:
www.site.com’s server DNS address could not be found.

Any advice on this? My google bucket is called site.com for what it’s worth… ?


#2

I’d go to the Crypto tab here and set “Always Use HTTPS”

Then you won’t need that page rule. But then I’d add a page rule so: www.example.com redirects to https://example.com

And to fix that DNS error, add an A record for just www and give it an IP address of 127.0.0.1 (a new trick I learned recently). Make sure that the www entry has an orange cloud. That entry will be a placeholder so the Page Rule can work.


#3

Thanks for getting back to me!

I went ahead and added the “Always use HTTPS” in the crpyto tab (and that is working for http://site.com).
Also added an A record for www with the IP address 127.0.0.1 but it won’t let me click the orange cloud as it says “the internal record type cannot be proxied”. And on the browser I get this error: “ERR_CONNECTION_REFUSED”

Thoughts?

Sidenote: When I add a cname for www that points to the same address (c.storage.googleapis.com) I get this error when I try to access www.site.com) “DNS_PROBE_FINISHED_NXDOMAIN”


#4

Ok, instead of 127.0.0.1, use the same IP address you’re using for the main site.


#6

That ended up working after I let it sit for a while and marinate hahah. Must’ve taken a while to clear the DNS cache on my computer or something.

Thanks for your help!


#7

Hi,
I have Same problem but the solution here has not helped me yet. When you go https://www.example.com, you will get this error "This site can’t provide a secure connection www. example. com uses an unsupported protocol. ERR_SSL_VERSION_OR_CIPHER_MISMATCH."

On the other hand, naked domain example.com works okay. When I try to add A record for www with main site IP, it tells me, “A CNAME already exists with that host. (Code: 81054)”. When I try to add A record for www with 127.0.0.1, it tells me "The internal record type cannot be proxied"

Any help please?


#8

I have the very same problem. Can someone help me out, please?