Hello,
I am having a WordPress website which is using an SSL certificate.
The website is configured not to use the www prefix and it is https://domain-name.com.
Currently, the CDN is directed to https://www.domain-name.com. So how can I configure the CDN to work with the non www address.
The website is hosted with SiteGround and I am using the free CDN package.
First, thank you very much for your response.
And how do I do what you said?
How do I remove the configuration for the DNS record of www?
Also, how can I set a page rule to redirect the naked domain? Is it thru WordPress…?
You open the DNS settings in your Cloudflare control panel and delete the respective record.
But keep in mind, in this way your site wont be reachable under www. If you still want it reachable you set up a a page rule. Have a look at Cloudflare’s help centre for a detailed walkthrough.
Thanks again for the answer.
It is really helping me.
I do have a question about the page rule I need to create.
I must say that I am totally new to all this CDN thing and also (of course) to these page rules.
I read this support page: https://support.cloudflare.com/hc/en-us/articles/218411427
And want to do a redirect as I was advised.
So for the first field “If the URL matches” I typed:
I typed the asterisk sign before and after the value - just the post here does not show it since it is the shortcode for “Bold”
As for the rule settings I choose:
“Forwarding URL”
And for the destination URL, I typed:
domain-name.com/*
Also here, I typed the asterisk sign before and after the value - just the post here does not show it since it is the shortcode for “Bold”
G-d bless you for the rapid response.
thank you very much my friend.
I am setting the rule as permanent, right?
I don’t see a reason why it be temporary.
If it is unlikely you ever want to use www you can do that. Otherwise temporary might be possibly better as it can be sometimes tricky to get “rid” of a permanent redirect as they are typically cached and it can take some while for that to expire.
I have just noticed that no matter what I type after the domain name, it is always returning the domain name only without the rest.
For example if I want to go to the “www.domain-name.com/contact-us” I am being redirected to “https://domain-name.com” only without the contact us.
How can I fix this?
I have uploaded a screenshot of how the rule looks like.