• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

No Subdomains on ServerShield Plus from Cloudflare

five

New Pleskian
Hello Everybody!
We want to use Subdomains with the new ServerShield Plus Extension for Plesk.

We use an authoritative DNS to manage all records.
The "www" record works well trough Servershield.
I want to handle for example the Subdomain "test.domain.tld" trough Servershield but can't get it working.

My DNS entries right now:

A-Record -> Server-IP
cloudflare-resolve-to.domain.tld -> CNAME -> domain.tld.
cf.www.domain.tld. -> CNAME -> domain.tld.
cf.test.domain.tld. -> CNAME -> domain.tld.
www.domain.tld. -> CNAME -> www.domain.tld.cdn.cloudflare.net.
test.domain.tld. -> test.domain.tld.cdn.cloudflare.net.

Any ideas to get this working?
 
Hi five,

pls. be informed about some basic knowledge:

CNAME - records are entries for already existing DNS - records - it should only be used ONCE. If you add an CNAME - entry for the domain "domain.tld", the only goal will be the redirect to the name "domain.tld" - an already existing A - record. Nothing more.

ALIAS - records are entries for already existing DNS - records and can co-exist with other records for the same name of an A - record. Not all DNS - providers offer this sort of DNS - record!

A - records are entries for one or more IPs. They resolve a name ( for example "domain.tld" ) to an IP.​


If you add test.domain.tld as a CNAME record, instead of an A - record, you will map the name "test.domain.tld" to "domain.tld". Nothing more. The content of "/var/www/vhosts/domain.tld/test.domain.tld" would never been served, instead, the content of "/var/www/vhosts/domain.tld/httpdocs" would be served, when surfing to "http://test.domain.tld".



If you add a subdomain over Plesk, you will notice, that the correct corresponding DNS - entries will be setup. Please see as well

Home > Subscriptions > domain.tld > Websites & Domains > DNS Settings

You will notice, that Plesk - created subdomains have as well an A - record, which you should copy over to your domain providers DNS - server, which will provide as well a Control Panel for you.
If your goal is now, that you would like Cloudflare to handle the traffic, you have to setup your subdomains like your domains, not with CNAME, but with an A - record.
 
Hello UFHH01,

thanks for this great explanation!
I already tried a different setup but also with no success...
Also the Plesk and the Cloudflare Support couldn't solve my problem in the last 3 days.

This is my actual setup for the subdomain "test.domain.tld":

test.domain.tld -> A-Record -> Server-IP
cf.test -> CNAME -> test.domain.tld.
cf.www.test -> CNAME -> test.domain.tld.
www.test -> CNAME -> www.test.domain.tld

Why I have the "www.test" entries in this setup?
Because Plesk has them configured in the Plesk Nameserver automatically.
It confuses me, but I've copied them exactly this way - also in both variants (www.test & test-only)

My DNS provider offers no ALIAS entry.

By the way: I'm also german but for the community I continue writing my little business english ;-)

Any more idea how to get this thing working?
Seems to be a general ServerShield problem...
 
Hi five,

you can leave out the part "www.test -> CNAME -> www.test.domain.tld" ... it is not necessary. Be informed, that it is your very own choice, if you configure "www." as well in your domain - specific configuration files, the option IF you would like to use ""www." as well is optional. Pls. see:

Home > Subscriptions > domain.tld > Websites & Domains > Hosting Settings

Please read as well: Configuring the Preferred Domain ( Plesk online documentation for Plesk 12.5 )


Please state clear, if the content from "test.domain.tld" is being served as expected, when you don't use Cloudflare. Only if this is the case, you would continue with the modifications at Cloudflare and afterwards at your domain providers Control panel, to change the existing DNS - entries to be served with the servershield.
 
Last edited by a moderator:
SOLVED THE PROBLEM! :)
To get Subdomains working with Servershield in Plesk you have to DISABLE the DNS of the Subdomains in Plesk and only have the DNS of the root Domain activated.
Then all DNS entries from Cloudflare ServerShield will be written in this DNS Zone and pushed to the Cloudflare Server.
If your authoritative DNS is configured according to the Plesk DNS settings everyting will work fine.
 
This Solution is not working for me.
Can you post your DNS Settings for this Domain?
What he means is to disable DNS for sub domain completely and maintain all records for that domain with root domain.So you will have to add DNS records for sub domain in root domain DNS
 
What he means is to disable DNS for sub domain completely and maintain all records for that domain with root domain.So you will have to add DNS records for sub domain in root domain DNS

I know i know what he means.... but for me is this Solution not working. Serverhield does not add any DNS Entrys in the Rootzone from the Domain and then i add the Settings manually, i have a 1016 DNS Error for the the Subdomain.
 
Back
Top