To enable Cloudflare for a subdomain after activating it for your main domain, follow these steps:
- Log in to your cPanel, locate the Cloudflare icon, and click the Manage button next to your domain.
- On the next page, go to the Subdomain tab. This displays a list of your domain’s subdomains and their Cloudflare status. For the desired subdomain, click the Activate button.
- In the Points To column, you’ll see a hostname like www.sub.gptservers.com.cdn.cloudflare.com (where sub.gptservers.com is your subdomain). Copy this hostname to your clipboard.
- Navigate to cPanel > Advanced DNS Zone Editor. If you have multiple domains, select the one with Cloudflare activated (e.g., gptservers.com) from the dropdown menu.
- Once the zone loads, find the records for your subdomain (e.g., sub.gptservers.com). You should see an A record and, if SPF is enabled, a TXT record. Delete the TXT record if present by clicking Delete, then click Edit next to the A record.
- Change the record type from A to CNAME, and paste the Cloudflare hostname copied in step 3 into the Address field.
- Click Edit Record to save. Allow a few hours for DNS propagation. Your subdomain is now set up with Cloudflare.
Note: If you’re using Cloudflare PLUS, it works the same way for subdomains as the free version. Once activated for your main domain, Cloudflare PLUS can be applied to subdomains without extra fees, following the same steps. For guidance on enabling Cloudflare for your main domain, refer to the Cloudflare tutorial in cPanel.