WordPress multisite with regional redirects


#1

We are looking at putting the site on Cloudflare and are looking for recommendations and best steps to take for our particular situation. Here are the details of our site.

The site is a WordPress multisite hosted on Bluehost with a Let’s Encrypt SSL certificate installed from bluehost.

There is a regional redirect in place that will redirect users to one of four sites based on the continent they are on. Once the user is redirected one time, they are then allowed to access any of the other sites.

If there is anything that needs to change or that will not work with the current setup any information you can provide will be very helpful.


#2

It depends. How are you determining the continent? GeoIP?

ideally, you should use the Cf-IPCountry HTTP header sent by Cloudflare to determine the country, and in turn the continent.

If you still want to do GeoIP, make sure you’re using the Cf-Connecting-Ip header. Since Cloudflare acts as a proxy in front of your server, the IP address (REMOTE_ADDR) will be one owned by Cloudflare. You should either change your application to use the value in Cf-Connecting-Ip, or restore the IP address with a server software/config.


closed #3

This topic was automatically closed after 31 days. New replies are no longer allowed.