Add Subdomain to Cloudflare in 3 Easy Steps
In today's digital landscape, subdomains play a crucial role in managing and organizing your website's content. They help in categorizing your site's sections, increase SEO benefits, and offer improved performance. Cloudflare, a powerful CDN and DNS provider, simplifies the process of adding a subdomain. Let's dive into a step-by-step guide on how to add a subdomain to Cloudflare.
Before proceeding, ensure you have your domain and website set up, and you're ready to point your DNS to Cloudflare. Also, this process assumes you have a basic understanding of how DNS records work.
Sign Up and Connect Your Domain with Cloudflare
Start by signing up for a Cloudflare account if you don't have one. Once logged in, click on 'Add Site' and enter your domain name. Cloudflare will scan your existing DNS records, listing them for you to review.
Confirm your scan results, and Cloudflare will generate a nameserver pair for you. You'll soon use this pair to transfer your domain's DNS to Cloudflare.
Transferring Your DNS to Cloudflare
Log in to your current domain registrar, find where you can edit your nameservers, and replace your existing nameservers with the ones provided by Cloudflare. Save the changes and wait for your domain's propagation.
Propagation usually takes a few minutes, but in some cases, it can take up to 48 hours. Once complete, proceed to add your subdomain on Cloudflare.
Adding a Subdomain in Cloudflare
Log in to your Cloudflare dashboard, and select your domain. Click on the 'DNS' tab, then 'Add Record' in the bottom left corner. To create a subdomain, enter the desired subdomain name (e.g., 'blog') in the 'Name' field, choose 'A' as the record type, and select the appropriate Cloudflare nameserver pointed to your origin server (e.g., 'example.com'). Click 'Save' to confirm.
After adding the subdomain, it may take some time for it to propagate. Once complete, your subdomain (e.g., 'blog.example.com') should point to your origin server. Remember to configure your web server to recognize the new subdomain.
Managing and Editing Subdomains on Cloudflare
Cloudflare allows easy management of your subdomains. To edit an existing subdomain, navigate to the 'DNS' tab, find the subdomain record, and click on it. Update the necessary fields and click 'Save' to apply changes.
Deleting a subdomain is equally simple. Select the subdomain record and click 'Delete', then confirm the action in the pop-up window.
Using Page Rules for Subdomain Customization
Cloudflare's Page Rules feature enables further customization of your subdomains. You can tweak various settings like cache control, security, performance, and more for specific subdomains. To create a page rule, click on the 'Page Rules' tab, enter your subdomain pattern (e.g., 'blog.example.com/*'), and click 'Create Rule'.
Once the rule is created, you can configure the settings you want. Click 'Save and Deploy' to apply the changes. Remember that DNS propagation may still be needed if changes impact your subdomain's DNS logic.
Streamlining your website's organization with subdomains on Cloudflare not only improves performance but also offers enhanced control and flexibility. Now that you've learned how to add and manage subdomains on Cloudflare, start exploring the myriad possibilities this powerful feature presents for your website.