Subdomain won't work - Digital Ocean


I’m facing a small issue with Digital Ocean + Cloudflare marriage :slight_smile:
I need to add a subdomain :

When I add NS (alone) from DigitalOcean suggested by every tutorials, error “ERR_NAME”
When I add NS then A record, I can’t (showing by the uploaded image)
When I add A record (alone), it does redirect but showing the IP which I does’nt want.

Sorry for this rookie question, I’m missing something ? Do I need to configure Digital Ocean’s side aswell ?

Thanks for your time!

You can’t delegate in a subdomain here. Your best bet would be to put all your DNS records here, then use Cloudflare for your domain’s name servers.

Thanks, so If I’m using 1&1 for example : I would have to put 1and1 domain DNS servers there ?

My configuration is quite simple : 1and1 for domain, Heroku for the root/www hosting and DigitalOcean for the subdomain hosting.

Thanks for your help

I am a tad confused. Your main domain does point to Cloudflare. What should blog be? A proper subdomain or just a host entry?

It’s a subdomain, Wordpress hosting on Digital Ocean. I have put NS records as suggested by tutorials.
I can’t put a CNAME because DigitalOceans gives IPs.

That is not much clearer I am afraid.

So you are saying it is a sub domain, by which you mean you’ll have further entries beneath blog.YOURDOMAIN and you want to delegate this to a third party nameserver, correct?

I’ll try to explain it more clearly :slight_smile:

There is one domain : (Hosted by Heroku)
which has 1 subdomain : (Hosted by DigitalOcean)

Domain was bought at 1& and configured to point to Cloudflare :

My goal is to centralize everything on Cloudflare :slight_smile:

My case seems to be similar to this one : Subdomain don't work
But I can’t figure it out a solution.

Maybe the only solution for me here is to put everything on DigitalOcean ?

Thanks! and sorry for this issue, it seems to be easy but I’m confused, it should work with NS records.

By hosted you mean the A records point to the provider in question, correct?

Your main domain does point to Cloudflare right now. The question is what do you want to do with blog. Should that just point to an IP address or should be a subdomain, where you can delegate further host records (i.e, etc.)?

For the blog, I just need to point to an IP address :slight_smile:, I have put an A record (which is the DigitalOcean’s address) but I got redirected :

Thanks sandro

So nothing beneath blog? In that case it is not a subdomain but a regular host entry of your main domain.

Simply create an A record in Cloudflare’s DNS control panel and point it to the desired IP address and you are good to go.

Yes but I would like to keep “” as a CNAME or ALIAS. It seems to be only a redirecting to the IP :


But if you prefer a CNAME instead of an A record, simply create a CNAME and point it to the desired hostname instead.

I can’t because DigitalOcean is working with IPs, that’s the issue. I can’t add a CNAME

Well, then why a CNAME? A CNAME requires a hostname, if you dont have that you naturally have to use an A record.

I am sorry but I fail to recognise the issue. Where should blog point to?

It’s okay you are helping me well :slight_smile: !

Blog should point to : (which is Digital Ocean IP’s address)
It’s working but as you may notice, when you go to, it redirects you to this address.

I don’t want this following behaviour: ->

I want that one :slight_smile:
When someone types -> it shows on his browser and DNS

Alright, then you create an A record pointing to that address (optionally you can proxy it with :orange: if you want that)

Thats not a DNS issue though, but an HTTP one. The server at that address simply sends a redirect to the address. That could be either because of a missing virtual host or some other configured redirect and is something you need to fix on that server. DNS is unrelated in this context.


Ohhhh yeah I just found something about this issue on Wordpress! You are the man sandro!
Thanks a lot

1 Like

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