How to connect digitalocean instance to cloudflare?

Hello Friends,

i have an instance on digitalocean and a domain on godaddy, i successfully connected the domain to the instance by changing domain`s nameserver to point to digital ocean and now the website is connected to domain but i want to put the same website on Cloudflare, the question is how i can do that ?

Thank you.

You need to use Cloudflare’s Name servers and DNS to make the connection.

https://support.cloudflare.com/hc/en-us/articles/201720164-Step-2-Create-a-Cloudflare-account-and-add-a-website

1 Like

I added the domain to Cloudflare and i changed the nameserver in godaddy but am getting this message now:

So…the IP address you have tied to that DNS entry should be your Droplet at Digital Ocean, but a 521 means Cloudflare is not getting a response.

From the Cloudflare DNS page, set your domain to :grey: and see if it works. This will bypass Cloudflare so you go straight to your Digital Ocean server.

Thanks for your quick response, i did that and unfortunately am having this page now.

Thanks.

So it’s definitely a server error.

Did it work before you added it to Cloudflare?

If you run ‘netstat -a’ on your droplet, is it listening for http and/or https?

Are you super-sure the DNS entry here at Cloudflare matches the IP address of your droplet?

Yes

i dont know what that means

Yes, first i added the name server of Digitalocean to the domain DNS, to connect the domain to the server, then i added the website to Cloudflare and i changed the domain dns pointed to Lily and todd

i dont know if i did it correct,

netstat is something you would run from command line, such as on your droplet.

If you’d like more precise troubleshooting help, go ahead and post your domain name. If you’re not comfortable with making it public, I can DM you.

Please find it below:

Jobium.net

Can you set it to :grey:?

1 Like

Hi,

Its back only after i changed the status of SSL from full to flexible but am getting the warning of the connection not being secure, i don`t know. if this will take some time until stabilize

It sounds like you don’t have SSL installed on your Droplet. Here are their instructions on how to do that:

2 Likes

In fact i dont, i will check this and back if any help needed, until then let me say thanks a lot for your time, i appreciate this.

1 Like

This topic was automatically closed after 31 days. New replies are no longer allowed.