Cloudflare DNS Records: Difference between revisions
m Update to use H2 headers for better readability |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== Preface == | == Preface == | ||
This tutorial will guide you through the steps necessary to host your DNS on Cloudflare using their free service. You can follow this guide | This tutorial will guide you through the steps necessary to host your DNS on Cloudflare using their free service. You can follow this guide whether your're using one of our hosting servers or one of our [https://heliohost.org/vps/ VPS plans]. | ||
== About Cloudflare == | == About Cloudflare == | ||
Cloudflare is a global CDN and also a DNS hosting service which has both free and paid plans. | Cloudflare is a global CDN (Content Delivery Network) and also a DNS (Domain Name System) hosting service which has both free and paid plans. | ||
== Create a Cloudflare Account == | == Create a Cloudflare Account == | ||
To begin, you will need to sign up for a free Cloudflare account [https://dash.cloudflare.com/sign-up?pt=f here]. | To begin, you will need to sign up for a free Cloudflare account [https://dash.cloudflare.com/sign-up?pt==f here]. | ||
== Setup Your Site on Cloudflare == | == Setup Your Site on Cloudflare == | ||
Go to your [https://dash.cloudflare.com/ Cloudflare dashboard] and at the top of your screen click on | Go to your [https://dash.cloudflare.com/ Cloudflare dashboard] and at the top of your screen click on 'Add site': | ||
[[File:cloudflare_add_site.png]] | |||
Enter your domain (without | Enter your domain (without 'www') and click the 'Add site' button: | ||
[[File:cloudflare_insert_domain.png]] | |||
On the bottom of that page, select Cloudflare's free plan and click on the | On the bottom of that page, select Cloudflare's free plan and click on the 'Continue' button: | ||
[[File:cloudflare_plan_selection.png]] | |||
Cloudflare will attempt to automatically detect and import your existing DNS records. | Cloudflare will attempt to automatically detect and import your existing DNS records. | ||
Line 33: | Line 33: | ||
If Cloudflare's automatic fetching fails or does not capture all necessary DNS records, you may need to manually import them. | If Cloudflare's automatic fetching fails or does not capture all necessary DNS records, you may need to manually import them. | ||
{{Info|Follow the steps below to look up the IP addresses to use for your server: | |||
== For Tommy | '''Login > Plesk > Websites & Domains > [domain name] > and check at the bottom of the page.'''}} | ||
Select the relevant text block for your server below, and save it as a text file on your computer. | |||
Open the text file in a text editor and: | |||
* Replace the IP address placeholders ('##.##.###.##' and '####:###:1:1ee::####') with the IP addresses displayed inside your Plesk account | |||
* Replace the 'yourdomain.com' text with your actual domain, without the leading http:// or https:// | |||
== For Johnny == | |||
<pre> | |||
;; | |||
;; _ _ _ _ _ _ _ | |||
;; | | | | | (_) | | | | | | | |||
;; | |_| | ___| |_ ___ | |_| | ___ ___| |_ | |||
;; | _ |/ _ \ | |/ _ \| _ |/ _ \/ __| __| | |||
;; | | | | __/ | | (_) | | | | (_) \__ \ |_ | |||
;; \_| |_/\___|_|_|\___/\_| |_/\___/|___/\__| | |||
;; | |||
;; | |||
;; Sample DNS records for Johnny server. Please check your IP addresses | |||
;; on your Plesk panel for actual values to use. | |||
;; | |||
;; A Records | |||
yourdomain.com. 1 IN A ##.##.###.## | |||
;; AAAA Records | |||
yourdomain.com. 1 IN AAAA ####:###:1:1ee::#### | |||
;; CNAME Records | |||
www.yourdomain.com. 1 IN CNAME yourdomain.com. | |||
;; MX Records | |||
yourdomain.com. 1 IN MX 0 yourdomain.com. | |||
;; TXT Records | |||
yourdomain.com. 1 IN TXT "v==spf1 ip4:##.##.###.## ip6:####:###:1:1ee::#### ~all" | |||
_dmarc.yourdomain.com. 1 IN TXT "v==DMARC1; p==none" | |||
</pre> | |||
== For Tommy == | |||
<pre> | <pre> | ||
Line 48: | Line 89: | ||
;; | ;; | ||
;; Sample DNS records for Tommy server. Please check your IP addresses | ;; Sample DNS records for Tommy server. Please check your IP addresses | ||
;; on your Plesk panel | ;; on your Plesk panel for actual values to use. | ||
;; | ;; | ||
;; A Records | ;; A Records | ||
yourdomain.com. 1 IN A | yourdomain.com. 1 IN A ##.##.###.## | ||
;; AAAA Records | ;; AAAA Records | ||
yourdomain.com. 1 IN AAAA | yourdomain.com. 1 IN AAAA ####:###:1:1ee::#### | ||
;; CNAME Records | ;; CNAME Records | ||
Line 64: | Line 105: | ||
;; TXT Records | ;; TXT Records | ||
yourdomain.com. 1 IN TXT "v=spf1 ip4: | yourdomain.com. 1 IN TXT "v==spf1 ip4:##.##.###.## ip6:####:###:1:1ee::#### ~all" | ||
_dmarc.yourdomain.com. 1 IN TXT "v=DMARC1; p=none" | _dmarc.yourdomain.com. 1 IN TXT "v==DMARC1; p==none" | ||
</pre> | </pre> | ||
== For | == For Morty == | ||
<pre> | <pre> | ||
Line 80: | Line 121: | ||
;; | ;; | ||
;; | ;; | ||
;; Sample DNS records for | ;; Sample DNS records for Morty server. Please check your IP addresses | ||
;; on your Plesk panel | ;; on your Plesk panel for actual values to use. | ||
;; | ;; | ||
;; A Records | ;; A Records | ||
yourdomain.com. 1 IN A | yourdomain.com. 1 IN A ##.##.###.## | ||
;; AAAA Records | ;; AAAA Records | ||
yourdomain.com. 1 IN AAAA | yourdomain.com. 1 IN AAAA ####:###:1:1ee::#### | ||
;; CNAME Records | ;; CNAME Records | ||
Line 97: | Line 138: | ||
;; TXT Records | ;; TXT Records | ||
yourdomain.com. 1 IN TXT "v=spf1 ip4: | yourdomain.com. 1 IN TXT "v==spf1 ip4:##.##.###.## ip6:####:###:1:1ee::#### ~all" | ||
_dmarc.yourdomain.com. 1 IN TXT "v=DMARC1; p=none" | _dmarc.yourdomain.com. 1 IN TXT "v==DMARC1; p==none" | ||
</pre> | </pre> | ||
Save and exit the text file, making sure you replaced '''all the IP address placeholders''' and the '''domain name placeholder''' with the IP addresses displayed inside your Plesk account. Be careful not to change anything else, as this could break the DNS zone file. | |||
Inside your Cloudflare dashboard, click on | Inside your Cloudflare dashboard, click on 'Import DNS Records' and select the text file you saved from the previous step to upload it to Cloudflare. | ||
[[File:cloudflare_import_dns_records.png]] | |||
== Configure DNS Records | == Configure DNS Records == | ||
After Cloudflare has imported your DNS records (automatically or manually via the text file), they will display your nameservers. | After Cloudflare has imported your DNS records (automatically or manually via the text file), they will display your nameservers. | ||
Line 113: | Line 154: | ||
Copy and add both nameservers to your domain's nameservers setting inside your domain registrar's dashboard/panel. | Copy and add both nameservers to your domain's nameservers setting inside your domain registrar's dashboard/panel. | ||
If you are unsure how to set nameservers inside your domain registrar's dashboard/panel, please reach out to your domain registrar's customer support. | {{Info|If you are unsure how to set nameservers inside your domain registrar's dashboard/panel, please reach out to your domain registrar's customer support.}} | ||
Then, return to your Cloudflare dashboard and click on | Then, return to your Cloudflare dashboard and click on 'Done, check nameservers' in the Cloudflare dashboard. | ||
[[File:cloudflare_nameservers.png]] | |||
== Manual Cloudflare Configuration == | == Manual Cloudflare Configuration == | ||
If you want to manually configure your Cloudflare settings, then set the | If you want to manually configure your Cloudflare settings, then set the 'A' and 'AAAA' records for the base domain to the IPs shown inside Plesk, and create a CNAME for 'www' that’s pointed to your domain. | ||
To view the IP addresses to use for your A and AAAA records, follow the steps below: | |||
'''Login > Plesk > Websites & Domains > [domain name] > and check at the bottom of the page.''' | |||
If you need email to work, you will also need additional records: an | {{Info|If you need email to work, you will also need additional records: an [[:Unlimited_Email_Accounts#SPF,_DKIM,_and_DMARC_Records|'MX', and 2 'TXT' records for 'SPF' and 'DKIM']].}} |
Latest revision as of 17:16, 17 January 2025
Cloudflare
Preface
This tutorial will guide you through the steps necessary to host your DNS on Cloudflare using their free service. You can follow this guide whether your're using one of our hosting servers or one of our VPS plans.
About Cloudflare
Cloudflare is a global CDN (Content Delivery Network) and also a DNS (Domain Name System) hosting service which has both free and paid plans.
Create a Cloudflare Account
To begin, you will need to sign up for a free Cloudflare account here.
Setup Your Site on Cloudflare
Go to your Cloudflare dashboard and at the top of your screen click on 'Add site':
Enter your domain (without 'www') and click the 'Add site' button:
On the bottom of that page, select Cloudflare's free plan and click on the 'Continue' button:
Cloudflare will attempt to automatically detect and import your existing DNS records.
Manual DNS Record Import
If Cloudflare's automatic fetching fails or does not capture all necessary DNS records, you may need to manually import them.
Follow the steps below to look up the IP addresses to use for your server:
Login > Plesk > Websites & Domains > [domain name] > and check at the bottom of the page.
Select the relevant text block for your server below, and save it as a text file on your computer.
Open the text file in a text editor and:
- Replace the IP address placeholders ('##.##.###.##' and '####:###:1:1ee::####') with the IP addresses displayed inside your Plesk account
- Replace the 'yourdomain.com' text with your actual domain, without the leading http:// or https://
For Johnny
;; ;; _ _ _ _ _ _ _ ;; | | | | | (_) | | | | | | ;; | |_| | ___| |_ ___ | |_| | ___ ___| |_ ;; | _ |/ _ \ | |/ _ \| _ |/ _ \/ __| __| ;; | | | | __/ | | (_) | | | | (_) \__ \ |_ ;; \_| |_/\___|_|_|\___/\_| |_/\___/|___/\__| ;; ;; ;; Sample DNS records for Johnny server. Please check your IP addresses ;; on your Plesk panel for actual values to use. ;; ;; A Records yourdomain.com. 1 IN A ##.##.###.## ;; AAAA Records yourdomain.com. 1 IN AAAA ####:###:1:1ee::#### ;; CNAME Records www.yourdomain.com. 1 IN CNAME yourdomain.com. ;; MX Records yourdomain.com. 1 IN MX 0 yourdomain.com. ;; TXT Records yourdomain.com. 1 IN TXT "v==spf1 ip4:##.##.###.## ip6:####:###:1:1ee::#### ~all" _dmarc.yourdomain.com. 1 IN TXT "v==DMARC1; p==none"
For Tommy
;; ;; _ _ _ _ _ _ _ ;; | | | | | (_) | | | | | | ;; | |_| | ___| |_ ___ | |_| | ___ ___| |_ ;; | _ |/ _ \ | |/ _ \| _ |/ _ \/ __| __| ;; | | | | __/ | | (_) | | | | (_) \__ \ |_ ;; \_| |_/\___|_|_|\___/\_| |_/\___/|___/\__| ;; ;; ;; Sample DNS records for Tommy server. Please check your IP addresses ;; on your Plesk panel for actual values to use. ;; ;; A Records yourdomain.com. 1 IN A ##.##.###.## ;; AAAA Records yourdomain.com. 1 IN AAAA ####:###:1:1ee::#### ;; CNAME Records www.yourdomain.com. 1 IN CNAME yourdomain.com. ;; MX Records yourdomain.com. 1 IN MX 0 yourdomain.com. ;; TXT Records yourdomain.com. 1 IN TXT "v==spf1 ip4:##.##.###.## ip6:####:###:1:1ee::#### ~all" _dmarc.yourdomain.com. 1 IN TXT "v==DMARC1; p==none"
For Morty
;; ;; _ _ _ _ _ _ _ ;; | | | | | (_) | | | | | | ;; | |_| | ___| |_ ___ | |_| | ___ ___| |_ ;; | _ |/ _ \ | |/ _ \| _ |/ _ \/ __| __| ;; | | | | __/ | | (_) | | | | (_) \__ \ |_ ;; \_| |_/\___|_|_|\___/\_| |_/\___/|___/\__| ;; ;; ;; Sample DNS records for Morty server. Please check your IP addresses ;; on your Plesk panel for actual values to use. ;; ;; A Records yourdomain.com. 1 IN A ##.##.###.## ;; AAAA Records yourdomain.com. 1 IN AAAA ####:###:1:1ee::#### ;; CNAME Records www.yourdomain.com. 1 IN CNAME yourdomain.com. ;; MX Records yourdomain.com. 1 IN MX 0 yourdomain.com. ;; TXT Records yourdomain.com. 1 IN TXT "v==spf1 ip4:##.##.###.## ip6:####:###:1:1ee::#### ~all" _dmarc.yourdomain.com. 1 IN TXT "v==DMARC1; p==none"
Save and exit the text file, making sure you replaced all the IP address placeholders and the domain name placeholder with the IP addresses displayed inside your Plesk account. Be careful not to change anything else, as this could break the DNS zone file.
Inside your Cloudflare dashboard, click on 'Import DNS Records' and select the text file you saved from the previous step to upload it to Cloudflare.
Configure DNS Records
After Cloudflare has imported your DNS records (automatically or manually via the text file), they will display your nameservers.
Copy and add both nameservers to your domain's nameservers setting inside your domain registrar's dashboard/panel.
If you are unsure how to set nameservers inside your domain registrar's dashboard/panel, please reach out to your domain registrar's customer support.
Then, return to your Cloudflare dashboard and click on 'Done, check nameservers' in the Cloudflare dashboard.
Manual Cloudflare Configuration
If you want to manually configure your Cloudflare settings, then set the 'A' and 'AAAA' records for the base domain to the IPs shown inside Plesk, and create a CNAME for 'www' that’s pointed to your domain.
To view the IP addresses to use for your A and AAAA records, follow the steps below:
Login > Plesk > Websites & Domains > [domain name] > and check at the bottom of the page.
If you need email to work, you will also need additional records: an 'MX', and 2 'TXT' records for 'SPF' and 'DKIM'.