Redirect Mobile and Desktop Traffic

Hi guys! I would like to redirect all mobile traffic to /mobile and desktop to /desktop. Im not using enterprise plan so i have no CF parameter to detect it in the request… so i though it could be okay to use User Agent for the redirect… my question is: Should i use transform rules or redirect rules? Do you know of a list of user agents that would meet my requirements?
8 Replies
Soham
Soham16mo ago
I know you can redirect mobile traffic to a different subdomain but not sure about path If you go to the intended zone, then go to speed, then to optimization and then to other, at the bottom you can see the option to redirect mobile traffic. However it might be worthwhile to make a responsive site instead
losek
losekOP16mo ago
Thank you for such a quick response! All my pages are static prerendered and i need to serve a grid of images in vertical for mobile and in horizontal if it is for desktop. The whole website is responsive but i just need to switch the homepage, the rest is would be responsive by default. I would only need to redirect / to /mobile or desktop in the homepage It looks like the mobile optimization setting only works for subdomain and no paths, i would guess i would need to use redirect rules or transform rules?
Soham
Soham16mo ago
Yeah, I tried as well but couldn't find much in redirecting paths so I just resorted to making a responsive website. I think you should try see if you can make the image grid responsive
losek
losekOP16mo ago
My main concern using redirect rules with user agents is it could lead to bad indexing by the googlebot for SEO
Soham
Soham16mo ago
Yeah What are you using to make the website responsive? CSS or a framework like bootstrap?
losek
losekOP16mo ago
I have tryed but i would have to make the homepage SSR by workers because there is no other way i know to dynamically populate the grids with the correct images Its pure css, i dont use frameworks. Mostly a mix of flex and grid With media queries Im not serving the same image source for mobile and desktop
Soham
Soham16mo ago
Oh Try using a rule and see how it goes If not, then you could try other solutions
losek
losekOP16mo ago
Okay! Thank you so much!
Want results from more Discord servers?
Add your server