Setting up Cloudflare for a Digital Ocean droplet

This is a quick recollection of the steps it took to set up Cloudflare for a website that is using Apache on a DigitalOcean Droplet.

What is a CDN and why do I need one?

If you’ve never heard of a CDN or have but are not sure what it is, here is a small explanation. A CDN is a global network of servers that helps distribute your website content to different places across the globe. Most websites start off on a single server. If you set up your own website, you will usually start with a hosting provider and a domain registrar. At the domain registrar you enter the address  of the hosting provider’s DNS servers and/or IP addresses. Sometimes you can have both services from a single company. This is so that when somebody types www.yourwebsite.com the request is correctly routed to your webserver.

In this setup, every visitor to your website will be served by your single server that you rented from your hosting provider. If your hosting provider is in Texas, and your website visitor is in Tokyo, Japan, it will naturally create a little bit of a delay in the communication that happens behind the scenes. The bigger the website you’re serving, the longer it will take to load everything between Texas and Tokyo. Now if you wanted to speed up the loading times for your Japanese visitors, you could set up another server in or close to Japan. But that would be a lot of work and it wouldn’t help your other visitors who might be in South Africa or in Norway.

A Content Distribution network will sit between your hosting provider and your visitors. Because it is a Network, it’s servers are distributed and it will be able to serve your content to much more places, and much faster than you could by setting up a server in every country. Here is an image that I took from Cloudflare’s website and it explains the setup very well I think.

How does the setup process work?

If you’re running a simple website with some information and pictures on it that are not using a secured connection, it’s fairly easy.

  1. Create a cloudflare account
  2. Get your new nameservers from cloudflare
  3. Enter your nameservers in your domain registrar‘s administration panel.
  4. Log in to cloudflare and set up your domains and subdomains
  5. Be sure you recreated all the DNS entries from your old domain registrar. For example, if you are using Google Apps for work, you also have to set up your MX records in your cloudflare account.

What if I use a secure connection over HTTPS?

This was the case for the site I was moving. Cloudflare has a couple of options in their management. They are mostly concerning what certificate to use (cloudflare vs. your own) and what part of the connection should be encrypted with with certificate. Because there are two parts in the connection.

User <-ssl-> Cloudflare <-ssl-> Your Server

Time required to issue a new certificate

If you are using the option Full or Full (strict), Cloudflare will require some time to issue a new certificate. In our case, for the first 24 hours, our website was showing the scary “Your connection is not private” message in all browsers. During that time, the SSL settings in the Cloudflare management screen were saying “Issuing new certificate” or something similar. It was eventually resolved automatically, but this is a very important factor if you’re migrating a website in production.

Join the Conversation

577 Comments

  1. Pingback: canada pharmacies
  2. Pingback: canadian drugs
  3. Pingback: drugstore online
  4. Pingback: fwervs.gumroad.com
  5. Pingback: mazhor4sezon
  6. Pingback: filmfilmfilmes
  7. Pingback: canadadrugs
  8. Pingback: gRh9UPV
  9. Pingback: drugs for sale
  10. Pingback: kertyun.flazio.com
  11. Pingback: 9-05-2022
  12. Pingback: kinoteatrzarya.ru
  13. Pingback: TopGun2022
  14. Pingback: Xvideos
  15. Pingback: XVIDEOSCOM Videos
  16. Pingback: canada medication
  17. Pingback: ivanesva
  18. Pingback: cialis from canada
  19. Pingback: cialis from canada
  20. Pingback: canadianpharmacy
  21. Pingback: canada drug
  22. Pingback: Netflix
  23. Pingback: FILM
  24. Pingback: designchita.ru
  25. Pingback: YA-krasneyu
  26. Pingback: design-human.ru
  27. Pingback: designmsu.ru
  28. Pingback: vkl-design.ru
  29. Pingback: irida-design.ru
  30. Pingback: projectio
  31. Pingback: psy online
  32. Pingback: drugstore online
  33. Pingback: Gz92uNNH
  34. Pingback: do-posle-psihologa
  35. Pingback: uels ukrain
  36. Pingback: meritroyalbet
  37. Pingback: meritroyalbet
  38. Pingback: madridbet
  39. Pingback: eurocasino
  40. Pingback: canadian drugs
  41. Pingback: DPTPtNqS
  42. Pingback: qQ8KZZE6
  43. Pingback: D6tuzANh
  44. Pingback: SHKALA TONOV
  45. Pingback: chelovek-iz-90-h
  46. Pingback: kwsde.zombeek.cz
  47. Pingback: 3Hk12Bl
  48. Pingback: online pharmacy
  49. Pingback: 3NOZC44
  50. Pingback: 01211
  51. Pingback: tor-lyubov-i-grom
  52. Pingback: film-tor-2022
  53. Pingback: hd-tor-2022
  54. Pingback: hdorg2.ru
  55. Pingback: JXNhGmmt
  56. Pingback: Psikholog
  57. Pingback: netstate.ru
  58. Pingback: 2laughable
  59. Pingback: meritroyalbet
  60. Pingback: canada viagra
  61. Pingback: Link
  62. Pingback: psy
  63. Pingback: bit.ly
  64. Pingback: cleantalkorg2.ru
  65. Pingback: bucha killings
  66. Pingback: War in Ukraine
  67. Pingback: Ukraine
  68. Pingback: site
  69. Pingback: stats
  70. Pingback: Ukraine-war
  71. Pingback: movies
  72. Pingback: gidonline
  73. Pingback: agrtyh.micro.blog
  74. Pingback: web
  75. Pingback: film.8filmov.ru
  76. Pingback: canadian drugs
  77. Pingback: canadian drugs
  78. Pingback: video
  79. Pingback: kawerc.proweb.cz
  80. Pingback: canada drugs
  81. Pingback: fermser.flazio.com
  82. Pingback: lawert.micro.blog
  83. Pingback: filmgoda.ru
  84. Pingback: rodnoe-kino-ru
  85. Pingback: alewrt.flazio.com
  86. Pingback: confeitofilm
  87. Pingback: stat.netstate.ru
  88. Pingback: buy cialis delhi
  89. Pingback: owzpkg.zombeek.cz
  90. Pingback: lasweb.iwopop.com
  91. Pingback: kalwer.micro.blog
  92. Pingback: buy cialis no rx
  93. Pingback: sY5am
  94. Pingback: canada viagra
  95. Pingback: Dom drakona
  96. Pingback: JGXldbkj
  97. Pingback: aOuSjapt
  98. Pingback: ìûøëåíèå
  99. Pingback: psikholog moskva
  100. Pingback: Dim Drakona 2022
  101. Pingback: buy viagra online
  102. Pingback: TwnE4zl6
  103. Pingback: psy 3CtwvjS
  104. Pingback: meriking
  105. Pingback: buy viagra no rx
  106. Pingback: lalochesia
  107. Pingback: buy viagra germany
  108. Pingback: film onlinee
  109. Pingback: pharmacy canada
  110. Pingback: stromectol sale
  111. Pingback: stromectol doses
  112. Pingback: stromectol drug
  113. Pingback: cialis from canada
  114. Pingback: 3qAIwwN
  115. Pingback: is stromectol safe
  116. Pingback: video-2
  117. Pingback: stromectol india
  118. Pingback: sezons.store
  119. Pingback: stromectol mites
  120. Pingback: psy-news.ru
  121. Pingback: stromectol oral
  122. Pingback: 000-1
  123. Pingback: 3SoTS32
  124. Pingback: 3DGofO7
  125. Pingback: stromectol
  126. Pingback: canadian drugs
  127. Pingback: canada drugs
  128. Pingback: buy viagra 25mg
  129. Pingback: canadian drugs
  130. Pingback: rftrip.ru
  131. Pingback: madridbet
  132. Pingback: canadadrugs
  133. Pingback: dolpsy.ru
  134. Pingback: online drug store
  135. Pingback: canada drug
  136. Pingback: logarkomx
  137. Pingback: kin0shki.ru
  138. Pingback: 3o9cpydyue4s8.ru
  139. Pingback: stromectol cream
  140. Pingback: Bahiscom
  141. Pingback: Betmatik
  142. Pingback: Betist
  143. Pingback: Cratosslot
  144. Pingback: Betlike
  145. Pingback: Betebet
  146. Pingback: Mariobet
  147. Pingback: Tempobet
  148. Pingback: Tipobet
  149. Pingback: Klasbahis
  150. Pingback: Vdcasino
  151. Pingback: Casinoeuro
  152. Pingback: imajbet
  153. Pingback: imajbet giris
  154. Pingback: Sahabet
  155. Pingback: stromectol doses
  156. Pingback: mb588.ru
  157. Pingback: 1xbet
  158. Pingback: Bahigo
  159. Pingback: Bahis siteleri
  160. Pingback: Onwin
  161. Pingback: Kralbet
  162. Pingback: Tipobet Giriş
  163. Pingback: Betkolik
  164. Pingback: Casino Siteleri
  165. Pingback: Bettilt
  166. Pingback: Betasus
  167. Pingback: newsukraine.ru
  168. Pingback: Dinamobet
  169. Pingback: Jojobet
  170. Pingback: Jojobet giriş
  171. Pingback: Hepsibahis
  172. Pingback: Marsbahis
  173. Pingback: meritking
  174. Pingback: edu-design.ru
  175. Pingback: tftl.ru
  176. Pingback: stromectol nz
  177. Pingback: buying stromectol
  178. Pingback: stromectol drug
  179. Pingback: stromectol pills
  180. Pingback: brutv
  181. Pingback: stromectol usa
  182. Pingback: site 2023
  183. Pingback: grandpashabet
  184. Pingback: canada drugs
  185. Pingback: cialis from canada
  186. Pingback: canadian pharmacy
  187. Pingback: online pharmacies
  188. Pingback: sitestats01
  189. Pingback: 1c789.ru
  190. Pingback: cttdu.ru
  191. Pingback: canadian pharmacys
  192. Pingback: 1703
  193. Pingback: hdserial2023.ru
  194. Pingback: serialhd2023.ru
  195. Pingback: matchonline2022.ru
  196. Pingback: bit.ly/3OEzOZR
  197. Pingback: bit.ly/3gGFqGq
  198. Pingback: bit.ly/3ARFdXA
  199. Pingback: bit.ly/3ig2UT5
  200. Pingback: bit.ly/3GQNK0J
  201. Pingback: canadian drugs
  202. Pingback: bep5w0Df
  203. Pingback: www
  204. Pingback: pharmacy canada
  205. Pingback: icf
  206. Pingback: 24hours-news
  207. Pingback: rusnewsweek
  208. Pingback: uluro-ado
Leave a comment