Get 30% off your WordPress Hosting with code WPSAVE10. Launch Faster. Save More!
  • 00 Days
  • 00 Hours
  • 00 Minutes
  • 00 Seconds

How do I redirect a user based on their location and IP address? - SIRSTEVEHQ CP

The SIRSTEVEHQ CDN nodes have inbuilt support for GeoIP. 

This means that each request gets an X-Country HTTP Header set which can be used to redirect traffic from specific countries. 

For example, if you wanted to redirect UK traffic that hits the '.com' version of your site you could add this in a .htaccess file. 

RewriteCond %{HTTP:X-Country} UK [nc]

RewriteRule (.*) http://my-new-domain.co.uk/$1 [L,R=302]

The free SIRSTEVEHQ CDN is available on our Cloud Hosting, WordPress Hosting, and Managed Cloud Servers.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Why are my images not being converted to WEBP format? - SIRSTEVEHQ CP

The SIRSTEVEHQ Web Optimisations allow you to quickly and easily optimise resources on your...

Does the SIRSTEVEHQ CDN perform cache warming?

Yes. The SIRSTEVEHQ CDN performs cache warming to ensure cached pages are served as frequently as...

CDN Security Headers - SIRSTEVEHQ CP

Using HTTP security headers can improve website and application security and protect against...

Do I need caching plugins in addition to the SIRSTEVEHQ CDN?

The short answer is no, the SIRSTEVEHQ Content Delivery Network takes care of caching for you....

How do I create a Website Acceleration Suite template? - SIRSTEVEHQ CP

There are over 40 settings in the Website Acceleration Suite that can make your site load faster....