Redirect naked https://domain.com to https://www.domain.com

ssl

#1

How can I have my naked domain at https://domain.com redirect to https://www.domain.com. Can someone help me find the solution for this? I assume it is a 301 redirect, but I need guidance. Thank you!


#2

Two options:

  1. page rule in Cloudflare, redirecting https://domain.com/* to https://www.domain.com/$1
  2. rule in the server (changes based on the server setup).

The 301 is permanent, usually cached by browsers and followed strictly by search engines, 302 isn’t.


#3

Thank you!! Going to try the first one and see how it goes.


#4

It doesn’t look like the 301 is working. The 2nd option of server side is not a option according to the host. Is there any way to see if I have something wrong? Does it take a while to work?
Here are the links:



#5

You are not using Cloudflare’s proxy, the DNS record needs to be :orange: for it to work.


#6

Thank you again for your help. I deleted that other record and I tried to create a new CNAME record and I receive this error. It does not let me do that. Does that make sense? What am I doing wrong?

DNS Validation Error (Code: 1004): This DNS record cannot be proxied - click the cloud icon to turn it gray to proceed (Code: 9041)


#7

Replace the CNAME record for clovercreativegroup.com with an A record with an IP address of 172.217.14.78

This is a placeholder IP address that points to Google. When you :orange: it, the Page Rule will intercept the request and send it to your www. Really.

Make sure the page rule matches clovercreativegroup.com/* (don’t put the https in front and it will match http and https) and redirect it to https://www.clovercreativegroup.com/$1 (just as @Matteo said).