Mobile redirect from subdomain to another subdomain

Hello everyone,

I have a domain : mydomain.io and a subdomain app.mydomain.io.

I want to redirect mobile users from app.mydomain.io to m.app.mydomain.io.

How can I achieve that ?

Thanks by advance

So the easiest way is with Cloudflare mobile redirect (https://support.cloudflare.com/hc/en-us/articles/200168336-Understanding-Cloudflare-Mobile-Redirect).

It sounds like you are wanting to do some custom domain (instead of www.yourdomain.com or yourdomain.com) to a mobile url. My guess is the best way to do that is via a cloudflare worker. If you checkout https://developers.cloudflare.com/workers/examples/conditional-response, at the bottom is an example of checking request.headers.get(“CF-Device-Type”) for “mobile” and redirecting accordingly.

Good luck!

1 Like

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