Wrong hostname sent to server

I’m having a very weird issue. I recently had to switch to a new domain, and after changing everything in the server files, adding the nameserver, dns records, etc, and waiting a day, these bugs are happening. It is not pending the nameserver change, I have cleared the cache, turning off the proxy doesn’t send anything to my server. It is correctly port forwarded, it worked fine before the domain change, and the main webpage does update when the proxy is on, so cloudflare isn’t just showing a cached version of the webpage. The SSL Checker shows that the correct domain matches the certificate, so there shouldn’t be any issues.

So, what is the problem?
My old domain was soue.tk. It was registered with Freenom, and they randomly stole it and are now charging money for it, so yeah I went with namesilo and registered soue.ca. Anyway, when I make a request to the web server, the host header is showing the correct domain, soue.ca, or whatever subdomain, eg images.soue.ca. I used a proxy to intercept the traffic to make sure my browser wasn’t displaying the wrong one, but it all checked out. This issue is also happening on multiple computers, on multiple browsers. This is not an issue from the client. When I log the domain in the server however, it shows soue.tk as the host header, even if I am using a subdomain. The url header does update, so it’s not using some constant header. The web server is built with node.js, and is running on a raspberry pi with port 80 port forwarded.

Again, when I turn off the proxy (the cloud is grey) then nothing is sent to the webserver. The correct ip is set, I have double checked several times.

Some info (Proxy (orange cloud) was turned on for these images)

Any help would be greatly appreciated!

It sounds like we can ignore soue.tk for now, as that’s no longer applicable. So this is what I see:

If that’s not what should show for that domain, I suggest you “Pause Cloudflare on Site” from the Overview page and fix the domain before you add it back to Cloudflare.

1 Like

This is what you should see. As a sort of debugging measure I replace .tk in the domain name with .ca
which then will use the right files and whatever. But if I request a subdomain, try clicking easyapis.soue.ca for example, it will just show the same page. It should not do that. When I log the result in the console then it still shows soue.tk as the host. I don’t see how this could be an issue with anything other than cloudflare

If you’ve set it to :grey:, and the IP address is correct, then it has nothing to do with Cloudflare. :grey: means it’s DNS-Only, so requests are going straight from the browser directly to your server.

Well when I have it set to to the grey cloud, then no traffic goes to the server. Would I have to set DNS records in Namesilo as well?

However, when I have the orange cloud, that’s when it’s sending the wrong host name to the server.

It could be cached content that’s still in :orange:, and that will eventually clear out (or you can Purge Everything), but that won’t fix the underlying problem that your site doesn’t work in :grey: mode.

I don’t think it’s cached since it’s still sending requests to the server. And I when I shut it down then nothing shows up. Also I have purged everything already.

I’ll look into it some more. Thanks!

Geez :facepalm: I forgot nginx existed, forgot to change the domain name there. Thanks for your help haha


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