Origin DNS Error when using Cloudflare server shield through Plesk (external DNS)

Hi guys.

I’ve set up the Cloudflare servershield on our Plesk server, activated my domain, and also added the records stated here:
https://support.cloudflare.com/hc/en-us/articles/225115728-How-do-I-set-up-Cloudflare-with-Plesk-if-I-manage-DNS-externally-

Unfortunately, i’m still getting the Origin DNS error…

Am i doing something wrong?

I can’t quite figure out how exactly this is supposed to work.

The domain is maler-daniel.dk

I’ve checked that the domain www.maler-daniel.dk points correctly:
;; ANSWER SECTION:
www.maler-daniel.dk. 299 IN CNAME www.maler-daniel.dk.cdn.Cloudflare.net.
www.maler-daniel.dk.cdn.Cloudflare.net. 599 IN A 104.24.121.230
www.maler-daniel.dk.cdn.Cloudflare.net. 599 IN A 104.24.120.230

And i’ve also verified that the other record is correct:
;; ANSWER SECTION:
Cloudflare-resolve-to.www.maler-daniel.dk. 299 IN CNAME maler-daniel.dk.
maler-daniel.dk. 299 IN A 93.90.114.55

So again, am i missing something?

Take a look at where the DNS for www points to in your Cloudflare DNS portion fo the Administration Control panel. Does that record exist in your DNS?

The DNS is not hosted in Cloudflare, when using plesk, its only possible to use the partial (CNAME) setup.

DNS Records

Your DNS zone file is hosted by your Plesk server, a Cloudflare partner. Changes to your DNS settings must be made through the your Plesk server website.

But DNS is not on the plesk server either, as we’re using external DNS.

“cf-resolve-to.” should probably be just “cf.” looking at the code for the plug-in

    public static function createCFResolveTo($rec_name, $overrideID = NULL) {
        $current_records = static::fetchRecordByName($rec_name, $overrideID);
        $errors = array();
        $regDomain = new Modules_servershield_regDomain();
        if(is_array($current_records) && !empty($current_records)) {
            foreach($current_records as $rec) {
            	$sub_name = $regDomain->extractSubdomainName($rec["host"], $rec["domain_name"]);
                $domain_id = $rec["domain_id"];
                $rec_type = $rec["type"];
                $rec_value = $rec["val"];
                $rec_host = ($sub_name) ? "cf." . $sub_name : "cf";
                $new_record = array("type" => $rec_type, "name" => $rec_host, "value" => $rec_value);
1 Like

Thank you so much for your quick replies, that fixed it. :star_struck:

I think you should add this to the article i linked in my first post, for future reference.

1 Like

Thanks for confirming. I was just coming back to ask if you would let me know if it worked. I will let the KB maintainers know it needs an update. Sorry for the (unnecessary) frustration. :flushed:

1 Like

No worries, i’m just glad we could resolve the issue so fast, even though i’ve been pulling my hair out for a few hours :wink:

1 Like