Cloudflare Domain Hosting DNS Resolution Tutorial

Who is Cloudflare?

It is an American network infrastructure and network security company founded in 2009 and headquartered in San Francisco. Cloudflare mainly provides a variety of cloud-based network services to help websites, applications and APIs improve performance, enhance security, and protect them from malicious attacks. It is famous for its content distribution network (CDN), distributed protection system (DDoS protection) and DNS services.

Cloudflare's core services include:

  1. Content Delivery Network (CDN):

    • Cloudflare provides a globally distributed network of servers that cache static content in data centers close to users, speeding up web page loads and reducing latency.
  2. DNS Service:

    • Cloudflare provides high-speed and secure DNS resolution services. The famous public DNS services are 1.1.1.1, known for its fast speed and strong privacy protection.
  3. DDoS Attack Protection:

    • Cloudflare mitigates Distributed Denial of Service (DDoS) attacks through its global network, protecting websites and applications from massive traffic attacks.
  4. Web Application Firewall (WAF):

    • Cloudflare provides a powerful web application firewall to help block malicious traffic and protect websites from common web attacks such as SQL injection, cross-site scripting, etc.
  5. Security service (SSL/TLS):

    • Cloudflare provides free and paid SSL/TLS encryption services to help sites quickly implement HTTPS and encrypt network traffic.
  6. Edge computing services:

    • Cloudflare provides a serverless computing platform called Cloudflare Workers that allows developers to run code directly on its global network, process requests, and reduce latency.
  7. Zero Trust Network Access:

    • Cloudflare provides Zero Trust security solutions for enterprises, allowing enterprise employees to securely access internal applications and resources without exposing public IP addresses.

Cloudflare's goal is to help build a better Internet. It is committed to providing efficient, fast, and secure network services to help individuals and businesses defend against malicious network attacks and improve network performance.

Cloudflare Domain Hosting DNS Resolution Tutorial-1

Cloudflare DNS configuration

First register Cloudflare After you have created an account and successfully added a site, you can use Cloudflare's DNS service.

Select "Website" in the account menu, click the corresponding website selection box in the list on the right, and you will enter the website management menu.

1. Log in to your Cloudflare account and add a site

Log in to cloudflare and click Add Site on the account homepage.

Cloudflare Domain Hosting DNS Resolution Tutorial-2

2. Enter the domain name you want to transfer to Cloudflare

Then on the next page enter the domain name we want to transfer.

Cloudflare Domain Hosting DNS Resolution Tutorial-3

3. Choose a plan

After entering the domain name, we choose a plan and just choose the free one.

Cloudflare Domain Hosting DNS Resolution Tutorial-4

4. Get the Cloudflare name server address

Then CF will scan the records you have added. After the scan is completed, just click Continue. If nothing goes wrong, you can see the page below. Scroll down and you can find the name server given to you by Cloudflare.

Cloudflare Domain Hosting DNS Resolution Tutorial-5

5. Enter the domain name registrar control panel to modify the DNS address

At this time, we need to go to the place where we bought the domain nameChanged to cloudflare.

Let's take Tencent Cloud as an example. Enter the Tencent Cloud console. Find Domain Registration, click My domain name, find the domain name for which you want to change DNS and click More,DNS Modification

Cloudflare Domain Hosting DNS Resolution Tutorial-6

In the pop-up window, select, then fill in the name server given to you on the cloudflare page.

Cloudflare Domain Hosting DNS Resolution Tutorial-7

 

Fill in the name servers that cf gave you.

Just complete this step, and we can go back to the cloudflare page to see if the domain name is hosted on cf.After success, we can resolve your domain name on cf.

Cloudflare adds DNS records

Select the DNS menu item, enter the "Record" submenu, and you will enter the DNS record setting item. When you use this service for the first time, the system will find the DNS record information by itself and automatically import it into Cloudflare's DNS record items. However, you cannot blindly trust the automatically imported content. It is best to manually add the DNS records of the original domain name service provider to Cloudflare's DNS record items one by one to avoid losing records and causing various problems.

Cloudflare Domain Hosting DNS Resolution Tutorial-8

When adding a record, select the record type, set the record name, and then fill in the corresponding IPv4 address. It is recommended to uncheck the proxy status and not use Cloudflare proxy. Because using this proxy will use Cloudflare's CDN service,Go to Cloudflare's CDN server to speed up page display. This is a good thing, but because this service is used for scientific Internet access and other illegal purposes, it is often blocked in China. Using their CDN, not only did the access speed not increase, but the web page could not be opened, which was not worth the loss.

After all records are added, you need to modify the name server (NS) of the original domain name registrar. After modifying the name server of the original domain name service provider to the name server specified by Cloudflare, the domain name hosting is completed. The name server specified by Cloudflare will be displayed on the DNS page, as shown in the figure below:

Cloudflare Domain Hosting DNS Resolution Tutorial-9

After the name servers of the original domain name service provider are changed to the name servers specified by Cloudflare, wait for a period of time for the changes to take effect, which will not exceed 48 hours. After the changes take effect, the status of the hosted domain name will be displayed as "√ Active", indicating that the domain name resolution is now hosted by Cloudflare.

Cloudflare configuration redirects

Since the primary domain name usually redirects to a secondary domain name, for example, example.com will redirect to http://www.example.com. This requires Configure domain name redirection at the DNS service provider. For Cloudflare, configuring redirection is also very convenient and simple.

First, configure the following two DNS records:

Record TypeHost RecordsRecord Value
A@
Awww1.1.1.1

Here, "@" indicates the primary domain name, and "www" is the secondary domain name. The example uses "1.1.1.1" as the resolved IP address. Set it to the correct value based on the actual situation.

Cloudflare Settings Page Rules

Then, go to the "Rules" menu item, enter the "Page Rules" secondary menu, click "Create Page Rules" on the settings page on the right, fill in the primary domain root in "URL", and then select "Forward URL". You can choose 301 or 302 for the status code. Enter the address you want to jump to in "Target URL", such as "https://www.example.com/", and click "Save Page Rules" to complete the redirection.

Cloudflare Domain Hosting DNS Resolution Tutorial-10

After the settings are completed, you can access the primary domain name through a browser to see if the jump is normal. If it can jump normally, the redirection settings are complete.

Of course, Cloudflare has many other free but very practical features. Friends who have the conditions can study it in depth. It is not limited to the hosted DNS resolution function.

Cloudflare provides powerful domain name hosting and DNS resolution services. Through its globally distributed server network, it ensures fast and stable domain name resolution, as well as efficient DDoS protection capabilities. Using Cloudflare's DNS service, websites can achieve faster loading speeds and enhanced security. Users can also easily set up custom DNS records and enable free SSL/TLS encryption. In addition, Cloudflare's DNS resolution service also includes public DNS resolution (1.1.1.1), which is known for its privacy protection and performance, helping to improve the overall website user experience.

5/5 - (1 vote)

Leave a Reply

Your email address will not be published. Required fields are marked *