Ionos and cloudflare ip geolocation setup

My website is hosted on an ionos managed server. I have CDN Railgun setup through Ionos server.

I want to implement geoip and have looked at article

Ionos support says they do NOT support the geo-ip package on a managed server. Has anyone set this support up through the Cloudflare dashboard for a website hosted on ionos managed server? Before I start myself, if there is someone who has experience/success, I’d be interested in any thing to watch out for.

Thanks in advance for any ideas


I’m not sure what you mean by a Geo-IP package. The article you linked to is just a way to include a Country Code header in Cloudflare requests. The last half of that article is just about how to read that header in different programming languages.

Thanks. I’m obviously somewhat confused. My objective is to stop/redirect SPAM to my website by ‘country code’, such as

The blocking countries in .htaccess as described in

uses syntax like the following.

Block Countries using GeoIP and mod_geoip

Deny from env=BlockCountry

To get the GEOIP_COUNTRY_CODE variable recognized, needs installed, and on my managed server, I don’t have access to the needed directories to set this up.

Since I have CDN Railgun enabled on my ionos server, a friend suggested using Cloudflare and their geo location.

I’m hesitant to do much until I understand how this works, as when I first enabled CDN Railgun on IONOS, I lost access to my website, though it was not obvious what DNS settings I should have changed. IONOS support, quickly fixed the problem. But, I’m gunshy that I might lose access to my website by trying setup on Cloudflare directly.

It’s up to whatever developer you have coding your site to use the Cloudflare country header to block activity within your server. Or just use a Cloudflare Firewall Rule to block unwanted traffic.

Thanks. “I am the developer” on my site. I will look at the Firewall Rules Language doc you referenced.

1 Like

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