Redirect non-www to www Google Sites?
i have cname record so that www shows google sites
But cant make https non-www and http non-www to redirect to https www
Whatâs not working? What are you using for your redirects? Page Rules, Transform Rules, Workers?
Google sites need only one thing- cname
CNAME www ghs.googlehosted .com
but how to make nonwww to www redirect?
I made redirect Redirect Rules but it didnt work latvijai .lv/* to www. latvijai . lv/$1 , also i had http:// wwwizer. com/ but it didnt work with https only http so i removed and now have www. latvijai.lv redirected you too many times. ERR_TOO_MANY_REDIRECTS
And redirect i removed and still with www. latvijai . lv dont work now
Google sites need only one thing- cname
CNAME www ghs.googlehosted .com
but how to make nonwww to www redirect?
I made redirect Redirect Rules but it didnt work domain .lv/* to www. domain . lv/$1 , also i had http:// wwwizer. com/ but it didnt work with https only http so i removed and now have www. domain.lv redirected you too many times. ERR_TOO_MANY_REDIRECTS
And redirect i removed and still with www. domain . lv dont work now
- Under CNAME value or alias, enter www
- In CN AME destination, enter ghs . googlehosted. com. (include period at the end)
- Save changes
- Come back to this tab and click Done
You have two different issues:
DNS_PROBE_FINISHED_NXDOMAIN occurs because you donât have a record for your apex (domain.lv in your example). You need to create a DNS Record for Cloudflareâs DNS to respond with Cloudflareâs Proxy IPs and get traffic flowing through Cloudflare. Cloudflare recommends you use either an A Record with the IPv4 reserved address of 192.0.2.0, or an AAAA record with the IPV6 Discard Address of 100::, for originless setups. Your redirect rule will handle the request before it tries to talk to your origin.
You can fix that by creating a record on your apex just like this:
Your second problem is that you seem to be trying to follow a guide for using a page rule to redirect from apex (domain.lv) to your www subdomain, but you are trying to do it within a dynamic redirect. Dynamic Redirects do not support that style of wildcards/replacements.
You could make that rule, as a page rule, with the same source (domain.lv/*), and with a target of https://www.domain.lv/$1, and it should work.
Alternatively, you could use bulk redirects. There is a guide here on how you could redirect from www to apex. You would just have to do it backwards basically.
You would create the DNS Record for your apex (@), if you havenât already.
Then the source url would be example.lv, and the target url https://www.example.lv, with the same parameters.
Redirecting www to domain apex ¡ Cloudflare Pages docs
Ok i made a 192.0.2.1 and aaa 100:: for @ without www
in Redirect example.com to www.example.com
is mentioned 192.0.2.1
i have Rules - Redirect rules in pic in not dynamic but static with /* and www/$1
Where is bulk redirects?
In guide is Bulk redirects, but they dont exist in my panel
oh found it. its deeper in Redirect rules scrolling lower
How to use 1st one without bulk redirects? What is better?
Hi,
Bulk Redirects, Redirect Rules, Transform Rules, itâs all a bit confusing at first. I believe your use-case asks for a single dynamic Redirect Rule.
Since youâre using the Hostname field, the âvalueâ cannot have /
or *
. Also, as @Chaika noted, you should not use Page Rules wildcards when using Redirect Rules. You can you the fields, then youâd need to reassemble the URL using the concat()
function. I havenât tested, but you can try this:
If hostname is:
example.com
Redirect to:
concat("https://www.example.com", http.request.uri.path)
with Preserve Query String enabled.
Check the Redirect Rules documentation for more details:
So then its not simple solution choosing from option dropdown?
One post before Bullk i tried and it gives ERR_CONNECTION_TIMED_OUT
Now disabling BUlk
Oh so i had single before but it was (http.host eq âdomain.lv/*â) and i turned it off when using Bulk, like this
This single redirect would never work for the reason @Chaika has mentioned already. Wildcard *
and placeholders $1
etc. do not work with Redirect Rules. They only work with Page Rules. Page Rules are being replaced with 4 different products, among them Redirect Rules. So at this point and time itâs best not to use Page Rules if you can avoid them.
Yes. Static would be used if all URLS with the hostname were to be redirected to a single URL (the homepage, for instance).
Error
âconcat(âhttp s://domain .lvâ, http.request.uri.path)â is not a valid value for expression because the expression is invalid: Filter parsing error (1:53): concat(âhttp s://domain .lvâ, http.request.uri.path) ^ expected ComparisonOp
Error
âconcat(âhttp s://domain .lvâ, http.request.uri.path)â is not a valid value for expression because the expression is invalid: Filter parsing error (1:53): concat(âhttp s://domain .lvâ, http.request.uri.path) ^ expected ComparisonOp
ERR_CONNECTION_TIMED_OUT
i get