How to redirect desktop user to desktop site?

I use the Mobile Redirect feature to direct mobile users to my mobile subdomain. Is there a way in Cloudflare to also direct desktop users to the regular non-mobile subdomain? I am worried that Desktop users who click links containing the mobile subdomain will be served the mobile site instead of being redirected to the desktop site.

Sorry, no. But I suspect this has been a problem since the beginning with your site. What have you tried so far?

I am using Cache Everything, so I can’t count on the requests hitting my server. Otherwise I would just redirect the user based on their user agent once the request gets to the server. I was hoping that there might be a way to redirect desktop users to the desktop version using Cloudflare Workers or something similar, so that I could have Cache Everything but also serve the correct version for the user’s device. Mobile Redirect works great for directing mobile users to the mobile version, but I see no way to direct desktop users to the desktop version.

You can certainly use a Worker, though every single request for your mobile site will go through it. Then what? Both sites have the same file structure? See if the A/B testing Worker script can be modified to suit. Or one of the geo-steering ones.

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