
Live Chat

Domain Scan

(empty)

Login
How to Manage Your Register.lk Domain with Cloudflare
(09-jul-2024)

Managing your website's DNS can be a daunting task, but with tools like Cloudflare, it becomes much easier. This guide will walk you through creating a Cloudflare account, understanding the benefits of using Cloudflare with Register.lk, and performing essential DNS management tasks like managing subdomains, setting up MX records, and redirecting traffic. By the end of this guide, you'll have a solid understanding of how to leverage Cloudflare to enhance your website's performance and security.
Benefits of Managing Register.lk Hosting DNS Through Cloudflare
Let's explore why you might use it to manage your Register.lk DNS:- Improved Performance: Cloudflare's CDN caches your static content at data centers around the world, reducing latency and speeding up load times for your visitors.
- Enhanced Security: Cloudflare offers built-in DDoS protection, firewall rules, and SSL/TLS encryption, safeguarding your site against cyber threats.
- Easy DNS Management: Cloudflare's intuitive dashboard makes it easy to manage your DNS records, even if you're not a tech expert.
- Free SSL Certificates: Cloudflare provides free SSL certificates, ensuring your site is secure without additional costs.
- Analytics: Get detailed insights into your website's traffic and security events.
Creating a New Cloudflare Account
Let's start with the basics: setting up a Cloudflare account. This is a straightforward process that comes with both free and premium options. Here's how to get started:- Visit Cloudflare's Website: Go to cloudflare.com and click on the "Sign Up" button.
- Sign Up: Enter your email address and create a password. Cloudflare offers both free and premium accounts, but for most users, the free plan is sufficient. The free plan includes essential features like DNS management, SSL/TLS encryption, DDoS protection, and basic CDN capabilities.
- Verify Email: You'll receive a verification email. Click the verification link to activate your account.
- Add Your Website: Once logged in, click "Add a Site", enter your domain, and follow the setup wizard.
Update Your Nameservers
During the setup process, Cloudflare will provide you with specific nameservers, such as"lisa.ns.cloudflare.com."
You need to update your domain's nameservers to these Cloudflare nameservers.
- Log in to your Register.lk account.
- Navigate to Nameservers Management:
- Go to the Register.lk website.
- Click "My Account."
- Select "Domains > My Domains."
- Click the "Active" button next to your domain.
- Update Nameservers: Replace your current nameservers with the ones provided by Cloudflare.
- Log in to your domain registrar's account.
- Navigate to the section for managing nameservers.
- Update Nameservers: Replace the existing nameservers with the Cloudflare nameservers provided during the setup.
Adding an A Record to the Root Domain and Pointing It to Your Hosting Package
Now, let's add an A record to the root domain and point it to your hosting package. This is crucial for directing traffic to your website hosted on Register.lk:- Log in to Cloudflare: Access your Cloudflare dashboard and select your domain.
- Go to DNS Settings: Click on the "DNS" tab.
- Add a Record: Click "Add Record".
- Type: Select "A" from the dropdown menu.
- Name: Enter "@" to represent the root domain (e.g: example.com).
- IP Address: Enter the IP address provided by Register.lk. Or you will be able to see the IP address of your hosting on your control panel dashboard.
- TTL: Choose an appropriate TTL (Time to Live) value, or leave it at the default.
- Proxy Status: Choose whether to enable or disable Cloudflare's proxy (orange cloud icon). Enabling the proxy provides additional benefits like CDN and security features.
- Save Changes: Click "Save" to apply your new A record.
Setting Up MX Records Using Your Cloudflare
Next, let's look at how to update MX records, which are essential for directing email to your mail server:- Access DNS Settings: From your Cloudflare dashboard, navigate to the "DNS" tab.
- Add MX Record: Click "Add Record," select "MX" from the dropdown menu.
- Enter Details: Input the name (usually just your domain, e.g:
example.com
), priority (lower numbers have higher priority), and the mail server address (e.g:mail.example.com
). - Save: Click "Save" to update your DNS settings.
Adding Other Record Types
You can add other record types (e.g., CNAME, TXT) by following the same path:- Log in to Cloudflare: Access your Cloudflare dashboard and select your domain.
- Go to DNS Settings: Click on the "DNS" tab.
- Add a Record: Click "Add Record".
- Type: Select the appropriate record type from the dropdown menu (CNAME, TXT, etc.).
- Enter Details: Fill in the necessary details for the record type you've selected.
- Save Changes: Click "Save" to apply your new DNS record.
Managing Subdomains Using Cloudflare
Okay, now let's see how to manage subdomains using Cloudflare. This process is straightforward and quick:- Log in to Cloudflare: Access your Cloudflare dashboard and select your domain.
- Go to DNS Settings: Click on the "DNS" tab.
- Add a Record: Click "Add Record," choose the type (usually an "A" record), enter the subdomain name (e.g:
subdomain.example.com
), and point it to the appropriate IP address. - Save Changes: Click "Save" to apply your new DNS record.
Understanding the Functionality of Proxy
Before we move on to redirection, it's important to understand the functionality of Cloudflare's proxy:- CDN: Caches your content at Cloudflare's global data centers, reducing latency.
- DDoS Protection: Detects and mitigates DDoS attacks, keeping your site online.
- SSL Encryption: Encrypts traffic between your visitors and Cloudflare, and optionally between Cloudflare and your origin server.
- IP Masking: Hides your origin server's IP address, protecting it from direct attacks.
Cloudflare Redirection
Now, let's see how to set up URL redirects using Cloudflare, which is useful for managing traffic. Here's how to do it:- Page Rules: Navigate to the "Page Rules" section in your Cloudflare dashboard.
- Create a Rule: Click "Create Page Rule" and enter the URL pattern you want to match (e.g:
example.com/old-page
). - Set Forwarding URL: Select "Forwarding URL" and choose "301 - Permanent Redirect" or "302 - Temporary Redirect" based on your needs.
- Enter Destination URL: Input the destination URL (e.g:
example.com/new-page
) where you want the traffic to be redirected. - Save and Deploy: Click "Save and Deploy" to activate the redirect.
Setting Up HTTP to HTTPS Redirection
Ensuring all traffic to your website is secure with HTTPS is crucial. Here's how you can set up an HTTP to HTTPS redirection using Cloudflare:- Page Rules: Navigate to the "Page Rules" section in your Cloudflare dashboard.
- Create a Rule: Click "Create Page Rule."
- Enter URL Pattern: In the URL pattern field, enter
http://example.com/*
(replaceexample.com
with your actual domain). The asterisk (*) ensures that all traffic, including subpages, is redirected. - Set Forwarding URL: In the "Then the settings are" section, select "Forwarding URL" and choose "301 - Permanent Redirect."
- Enter Destination URL: In the "Destination URL" field, enter
https://example.com/$1
. The$1
preserves the path after the domain. - Save and Deploy: Click "Save and Deploy" to activate the redirect.
Conclusion
In this guide, we've walked you through the essential steps of setting up a Cloudflare account, updating your nameservers, managing subdomains, configuring MX records, and setting up URL redirects. Additionally, we've explored the functionality of Cloudflare's proxy and demonstrated how to ensure all traffic to your site is secured with HTTPS redirection.If you need further support on your Cloudflare DNS management, do not hesitate to contact Register.lk Support Team.
