Wildcard DNS A record isnt working

I just didnt a tidy up of my Cloudflare settings and re made all my DNS records (they were a bit of a mess as I didint quite know what I was doing at the time when I made them) however one of those DNS records was a wildcard A record. The issue is is that now that I have added it back in, it no longer works. Ive got my web server set up in a way that it handles wildcard subdomains nicely, and I’ve confirmed that it still works locally, but if I try going through my url it loads for a good 2 minutes and then says that the site cant be reached.

Any idea what I have done wrong because I’m really lost here.

Unless it’s an Enterprise plan, that wildcard is not proxied, so it’s a direct connection to your server’s IP address. Your best bet would be to open your browser’s Dev Tools (F12 in Chrome) and watch the Network tab to see what’s going on with the connection. The Console tab sometimes has useful info as well.

Its not an enterprise plan, but how come I had it before then?
Also, why should it matter if it is proxied or not? If It’s a direction connection then shouldn’t the server just handle it normally?

(also the dev tools doesnt show anything. The network tab just shows the url as red text and says “failed to load response data” on the preview section)

Yes, it should. And it sounds like it isn’t. You’ll need to troubleshoot this at your server.

After doing some digging, it appears that any subdomain request that would go though the wildcard (eg, not “www” or “test” which is a test subdomain i set up and explicitly made) doesnt even make it to the server. I cant see any incoming requests / packets on the server or on the router, and both firewalls were turned off while testing. So I think its getting trapped in cloudflare somewhere.

What’s one of the hostnames you’re testing?

heyimsimon.co.nz is the main domain
test.heyimsimon.co.nz is that test one mentioned

and you should be able to put anything else instead of test and it use to redirect you to the root domain and add wrong subdomain in the url
(see .conf file)

so for example hello.heyimsimon.co.nz should redirect you to heyimsimon.co.nz/?e=hello.heyimsimon.co.nz

The main site works, and the test subdomain is proxied by Cloudflare and works.

yeah thats because the test site was added manually. but if you do anything else, eg hello.heyimsimon.co.nz it just loads forever. it should be redirected back to the main site.

Ah, I didn’t that far down the list. The ‘hello’ subdomain, as a wildcard, goes straight to your server.

I’m not sure what else to do then

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