DEV Community

1001binary
1001binary

Posted on

Integrate your website into Cloudflare

Suppose you have hosted your website. One day you want it more secured, DDos mitigation and faster. Don't worry! Cloudflare can help you. Cloudflare provides services such as CDN, DDos mitigation, internet security and so on. Cloudflare sits between users and your hosting server. This means that Cloudflare will handle requests from clients before going to web server. Cloudflare offers free and paid packages. This depends on your needs.

The following is steps by steps to integrate your website into Cloudflare:

Name Server
NS [YOUR_CLOUDFLARE_NAMESERVER1]
NS [YOUR_CLOUDFLARE_NAMESERVER2]
  • Click "Add Website" link on Cloudflare website.
  • Enter your domain.
  • Go to DNS area to add following DNS records:
DNS Type Name Value
A www [IP_ADDRESS_OF_YOUR_SERVER]
  • Make a cup of tea.
  • Your website is live.

Cloudflare's Benefits:

  • Users can't see actual IP Address of your server over Browser Development Tools.
  • Assets of your website will be automatically cached such as JavaScript files, Stylesheets and so on.
  • Always redirect http to https.
  • ...

Hope you enjoy this post.

Happy coding :)

Top comments (2)

Collapse
 
sp1ke77 profile image
Isaque Fernandes • Edited

Thank you for the post.
I suggest the nameserver part to be corrected.
The nameservers are different for every Cloudflare account, so abby.ns.cloudflare.com and tom.ns.cloudflare.com are assigned to you, but another user will have different names.
Appart from that, nice post. Keep it up

Collapse
 
1001binary profile image
1001binary

Thanks Isaque. I just updated this post.