• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Cloudflare and a domain without www

SalvadorS

Regular Pleskian
Hello,

We activate cloud flare for a server but we have a problem.

When cloudflare changes the DNS records for a domain add following record:

www CNAME www.domain.es.cdn.cloudflare.net.

But our domains works without www by default, so when yo access to domain.com instead of www.domain.com no cloudflare is working.

How can we fix this in the DNS records?

Thanks
 
@SalvadorS

How did you activate cloudflare: did you use the Plesk extension (i.e. Plesk should be a primary nameserver) or did you use cloudflare´s own dns system?

Let me know, I can then respond to your question.

Regards....
 
@SalvadorS

If I am not mistaken, setting DNS to

<domain>.<tld> CNAME <domain>.<tld>.cdn.cloudflare.net (AND)
www.<domain>.<tld> CNAME www.<domain>.<tld>.cdn.cloudflare.net

should do the trick.

However, you can expect some problems to occur, since the Plesk Cloudflare extension (i.e. the ServerShield extension) actually manages DNS entries for CloudFlare.

If the extension is not coded to do anything with the <domain>.<tld> records, then it can be the case that CloudFlare still does not work on <domain>.<tld>.

I was investigating this and other issues with the Cloudflare extension in a recent past, but I had to give some priority to other tasks.

It was already concluded from that investigation that is better to activate Cloudflare on a site by

a) using the (lightning fast) Cloudflare DNS system, for all DNS records concerning the domain, for which you want to activate CloudFlare,

b) adding the nameservers of Cloudflare in

- the DNS records of Plesk, if Plesk is a primary nameserver (or)
- the DNS management system of the domain registrar, if Plesk is not a primary nameserver

and manage DNS records via the CloudFlare panel.

The main advantage of the before mentioned approach, besides having a work-around for the issues with the Plesk extension, is that one can activate or deactivate CloudFlare instantly, on every subdomain (with the click of a button).

Note that any CNAME record is correctly handled by CloudFlare, if you use this approach.

Finally, note that if you really want to use CloudFlare to it´s full potential, then the approach, described in points a and b, should be preferred.

Hope the above helps.

Regards....
 
What you describe is not possible..
This method of CF integration can only work with www.
If you want to use non-www you will need to sign up on the CF website in the usual manner.
 
@Dx3webs

What is not possible?

There are three (proven) ways to activate CloudFlare on a domain, hosted on a Plesk instance.

If Plesk functions as a primary nameserver, the CloudFlare extension is the most easy approach.......and any issue with that extension (there are some) can resolved.

So, I am not sure what in your opinion is impossible, please elaborate.

Regards......
 
Do you know of a way to enable *www while using plesk as the primary nameserver?

edit...
*NON-WWW
 
Last edited:
@SalvadorS

It always had to be

www.domain.com CNAME www.domain.com.cdn.cloudflare.net

and NOT the

xxx.com CNAME www.xxx.com.cdn.cloudflare.com

that you were using, which could explain the errors: the differences are the "www" prefix AND the ".net" tld (instead of the ".com" used by you).

However, there were some small changes in the required CloudFlare setup, have a look at:

How do I set up Cloudflare with Plesk if I manage DNS externally?

Note that the article above is rather cryptic and it can be the case that it is not clear and/or not applying to your situation.

In short, you first have to determine what the basics of your setup are:

a) are you using Plesk as a primary nameserver? If yes: the Plesk CloudFlare extension should take care of proper DNS entries,

b) are you using Plesk only (!) as a secondary nameserver? If yes, then the DNS records at the Registrar´s DNS system should be altered to point to CloudFlare,

and there is a third hybrid DNS setup, but I will omit that for the sake of convenience.

In case point a applies: you should not have any issue at all, unless you altered something in the default DNS templates from Plesk or Bind DNS settings.

In case point b applies: if the DNS records at the Registrar´s DNS system are correct, then you should not have any issue at all, unless the Registrar´s DNS system is not "that good at all", in which case any issue should be resolved by the Registrar.

In summary, start with determining whether point a or point b applies and, afterwards, adjust the DNS records accordingly, in order to determine where the root cause of the problem is occurring.

Please note that you sometimes have to have some patience, due to the propagation time of DNS changes.

So, it is a small tip to recommend that the TTL (for DNS propagation) is as small as possible during testing, you should set the TTL to normal values afterwards.

Hope the above helps a bit.

Regards......
 
Back
Top