Why is server IP address showing when I ping my domain?

Hi,

I just added Cloudflare to my website because I was experiencing a DDoS attack. My website seems to be working properly now but I thought that when I ping my domain name that the Cloudflare IPs would show; why does it still show my current server/website IP address?

Thank you!

DNS propagation. Did you proxy the records? What’s the domain?

Yes, I proxy’d all the records; the strange thing is it first was showing Cloudflare IPs because I would see 104.x.x.x when I would ping but now it’s showing my IP address again. I tried to run ipconfig /flushdns on my PC too. But maybe it’s like you said and the DNS is still propagating.

Maybe reboot your router.

Unfortunately, as you’ve only just added it to Cloudflare for the first time, I’d assume the same as @sandro in that it’s likely a propagation issue.

The IP address(es) resolved for your domain may fluctuate while it’s initially propagating. Once it’s fully propagated though, now that you’re using Cloudflare and have orange-clouded it, should you need to update the origin IP of those proxied records in the future, it will be reflected substantially faster.

It looks like DNS propagation has completed now, however, now I’m having issues with DDoS attack again. I believe hacker knows my actual IP address and is bypassing Cloudfare, I ended up adding the following to my .htaccess file to only allow traffic from the following Cloudfare IP addresses but my website still won’t load when I try to access it. Now when I try to access my website I get receive Forbidden message, I’m guessing because of deny from all in my .htaccess file but shouldn’t traffic be coming from Cloudflare now?

# https://www.cloudflare.com/ips-v4 
# https://www.cloudflare.com/ips-v6

deny from all
allow from 103.21.244.0/22
allow from 103.22.200.0/22
allow from 103.31.4.0/22
allow from 104.16.0.0/12
allow from 108.162.192.0/18
allow from 131.0.72.0/22
allow from 141.101.64.0/18
allow from 162.158.0.0/15
allow from 172.64.0.0/13
allow from 173.245.48.0/20
allow from 188.114.96.0/20
allow from 190.93.240.0/20
allow from 197.234.240.0/22
allow from 198.41.128.0/17
allow from 199.27.128.0/21
allow from 2400:cb00::/32
allow from 2405:8100::/32
allow from 2405:b500::/32
allow from 2606:4700::/32
allow from 2803:f800::/32
allow from 2c0f:f248::/32
allow from 2a06:98c0::/29

Thank you!

That’s a different question and should be covered in another thread. I’d also recommend to use the search, as there will be quite a few other threads on that topic.