Basics and setting up new domain
What is a domain?
For Example for https://www.divyashchauhan.com
- http/https : protocols
- www : subdomain
- divyanshchauhan : domain
- com : domain extension
You can have one domain for your main website which is called apex domain like https://divyashchauhan.com and then you can have subdomains for your other websites like https://blog.divyashchauhan.com/
So buy a domain name and then you can have subdomains for your other websites by pointing all these apex and subdomains to different servers ip addresses.
Setting up cloudflare for your domain
Buy a domain from anywhere then create a cloudflare account then click on add site and then add the domain name in cloudlare dashboard.
It will give you cloudflare nameservers for your domain, then you have to add these to your custom DNS nameservers field in settings menu of the domain provider from which you purchased.
It will take some time for cloudflare. Ideally it should take around 10 minutes.
Cloudflare will show Cloudflare is now protecting your site in the dashboard for your domain.
Then go into DNS and you can see the nameservers we added will show up unser nameservers section.
Now in DNS section, if you have some A records pointing to some IP address then delete them and then create new A records and point them to your servers ip addresses.
SSL/TLS Section
Under Overview:
-
Best if Full (It encrypts both sides of the communication. Client to website and website to server.)
-
Select Full (Srtict) (It will only work when you have Cloudflare SSL cetificate installed on server also)
-
If full strict is selected then check your website if invalid SSL error occurs then go with full mode.
-
Flexible means only client to website is encrypted.
-
Check SSL/TLS Recommender.
Under Edge Certificates:
- Check Always Use HTTPS
Email Forwarding
Can set up email forwarding for your custom domain email address like connect@divyanshchauhan.com to your email address.