Apache vhost and unknown donains

This is probably something very silly but I can’t figure out the correct way to fix it.

I have a site, domain.com which is hosted on a VPS. I have it set up via VHOSTS so that if you go to domain.com it works, and if you access it via the direct IP it shows a different page.

As I’m using a well reused IP address there are at least 2 sites (unknown1.com and unknown2.com) I’ve discovered whose DNS servers are pointing at my IP as A records. I’ve never noticed before.

After switching to Cloudflare it seems that these requests for these two unknown domains are serving up the pages from domain.com whereas before they were serving up a single page for the IP address.

I only noticed as it appears search engine crawlers are not looking at the unknown domains which is showing up in my logs.

I’m sure there’s an easy forward all headers option or something I’m missing - but - any advice?

Thanks.

Hello,

If you have changed the nameservers at the registrar then only your DNS records should be valid for that zone. If they are able to connect to your origin that is something we do not recommend. As we want the origin to only allow connections from our IP addresses. I would just lock the origin down to only allow connections from Cloudflare IP’s. So any traffic that is not a part of a proxied DNS record will not be accepted at your origin.

Protect your origin server · Cloudflare Fundamentals docs.

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