-3

I have configured a subdomain blog.example.net with dreamhost like this

blog    CNAME   mygreatblog.ghost.io

meaning blog.example.net points to mygreatblog.ghost.io via a CNAME record.

I can confirm the properly set CNAME here:

https://www.whatsmydns.net/#CNAME/blog.example.net

However, when I actually visit blog.example.net I keep ending up on a different website - a gitlab instance that I also host under a different subdomain on example.net.

I can even confirm that there is a wrong A record stored that points to an IP that I don't recognize (it seems to be some cloudflare-network IP):

https://www.whatsmydns.net/#A/blog.example.net

Now this is what I tried:

  • Open blog.example.net in an incognito window
  • Refresh DNS at dreamhost, where the domain is registered with the nameservers
  • Wait 12 hours
  • Flush DNS cache at Google and OpenDNS

What I would like to do: Purge the cache of cloudflare. However, I don't even have an account with cloudflare (at least none that I am aware of). My gitlab instance uses cloudflare somehow but I can't find any documentation on that.

So my question:

Is this a DNS caching issue?

If yes, why did the dns flushes have no effect?

If this is not a DNS caching issue, what else could it be?

4
  • 1
    I'm not seeing any record for blog.maxmuster.net, and the link you reference shows the same. Bunch of red Xs on both CNAME and A links.
    – ceejayoz
    May 24, 2018 at 18:11
  • yeah sorry, I decided not to put the actual domain name there. The links aren't actually working.
    – user195692
    May 24, 2018 at 18:57
  • 4
    Please don't do that. Use example.com/net/org or something like foo.invalid if you're providing non-functional examples. DNS questions like this usually need the actual domain to be readily answerable by us.
    – ceejayoz
    May 24, 2018 at 18:58
  • Isn't it ironic that I posted the question, got my answer - everything's great, the system works ... but I get downvotes and now the question is closed - signalling that this is not how I am supposed to ask questions here. A difficult case to make, isn't it?
    – user195692
    Jun 7, 2018 at 23:36

1 Answer 1

2

Even without knowing the actual domain names the root cause is clear. A CNAME record isn't an HTTP redirection nor HTTP reverse proxy. The server at mygreatblog.example.com is not aware of hostname blog.example.net (sent by the web browser in HTTP Host: header) and doesn't know which site it should display. Therefore, you get whatever is configured as the default virtual host.

Possible solutions:

  • Contant the service provider and ask if it's possible to add an alias to the virtualhost.
  • Use your own server to perform an HTTP redirection (URL changes).
  • Use your own server as a HTTP reverse proxy.
2
  • You solved it. Thank you very much indeed! At Ghost.io you can simply tell them that you use a different domain for your blog and that was it.
    – user195692
    May 25, 2018 at 23:25
  • Do I get it right: mygreatblog.ghost.io was misconfigured - OK. But apparently, as a consequence, blog.example.net defaults on DNS level to an A record of some subdomain of example.com.
    – user195692
    May 25, 2018 at 23:31

Not the answer you're looking for? Browse other questions tagged .