How to set up a host name in DigitalOcean while using CloudFlare?

Posted June 15, 2016 44.2k views
WordPressDigitalOceanDNSIPv6LEMPUbuntu 16.04

Hey friends,
I need some help to set up a host name. I have already registered domain and my website is running as well on Dedicated hosting server. Additionally, I’m using CloudFlare.

Few days back, I was reading about solution for high traffic website and find out DigitalOcean in answer. 3 days back, I have created a droplet and installed WordPress with LEMP (Nginx) on Ubuntu 16.04.

Today I’ve completely clone (migrated) my website in DigitalOcean droplet IP. It’s working fine and no error. Now…

Please guide / help me to set up a host name in DigitalOcean droplet while using CloudFlare.

Note: my websites are live and thousands of people’s visiting per day so kindly suggest me right direction.

Thank you!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hello @chinmayrajyaguru -

This guide provides step-by-step instructions for setting up CloudFlare as a reverse proxy to your DigitalOcean droplet, which is exactly what you need:

GUIDE: How to use CloudFlare with your DigitalOcean Droplet
cloudflare Section 1: Configure your domain to use CloudFlare. Starting on CloudFlare, you need to scan your domain’s current DNS setup. Then CloudFlare will give you updated nameservers to use in your domain registrar’s settings. Read Guide
by Mitchell Anicas
CloudFlare is a company that provides content delivery network (CDN) and distributed DNS services by acting as a reverse proxy for websites. CloudFlare's free and paid services can be used to improve the security, speed, and availability of a website in a variety of ways. In...

At this point you should be able to just move your nameservers to CloudFlare and have your DNS configured in your CloudFlare dashboard.

As soon as you hit the orange cloud in your CloudFlare dashboard your domain will be routed through CloudFlare’s network.

Here are some tips for WordPress:

Additionally anyone using Apache should really install the Mod_CloudFlare plugin for Apache as it will drastically improve integration with CloudFlare.