Point subdomain to Digital Ocean droplet

I have a domain using Cloudflare and I want to create a subdomain that points to a bucket in Digital Ocean. (test.example.com)

So, I created a new A registry on the “DNS” tab in Cloudflare.
I added:
A ---- test ---- 138.xxx.xxx.xxx — orange cloud (Proxied)

For some reason this doesn’t work and shows a Error 521 ( Web server is down).

If however I removed the proxied option and use "dns only " (grey cloud), it works as expected.

What’s going on?
I would like it to be proxied so I can have SSL on my digital ocean droplet.

Also, do I need to do anything in Digital Ocean?
They have an option to add domains, but not sure what’s for if I have to do it all from Cloudflare?

  1. Make sure you don’t have a firewall set up that’s blocking Cloudflare
  2. Add SSL to that subdomain so you can use Full (Strict) SSL here.

I’m not yet very bothered about the full SSL.
Just need SSL for ajax request from an external domain :slight_smile:

I forgot to mention,
In cloudflare my root domain (example.com) is pointing to, let’s say, server A.
However, I want my subdomain to point to server B, where Digital Ocean droplet lives.

Would that be any issue?

I have no firewall:

Only if you have the wrong IP address for the subdomain on Server B. But it sounds like that isn’t the problem, as you can reach it if it’s set to :grey:. That sure looks like Cloudflare is getting blocked. You don’t have any Page Rules for that subdomain, do you?

Well the only one I can find is the following:

Always Use HTTPS

Would that be a problem?

No, that one is ok. That shouldn’t give you a 521.

Also, do I need to do anything in Digital Ocean?

They have a networking option that allows us to add domains and mange ttheir dns and so on:

But not sure if I should just ignore that if I use cloudflare.

Do you do contracting? Would you be interested in taking a look at my account?
My twitter: @imac2

No, that’s their DNS if that’s the name servers you use…which you don’t.

Are you possibly trying to use HTTPS and your server isn’t listening on Port 443?

Try opening a Support Ticket here. They might see why there’s a 521:
Login to Cloudflare and then contact Cloudflare Support by clicking on the Get More Help button.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.