Forward mobile devices to amp webpage


#1

Hey All,

I have a mobile section of my website accessed via domain.com/?amp , it’s not a sub domain. How do I just forward mobile devices via cloudfare to that part of the website?


#2

This wouldn’t be natively supported by the mobile redirect feature, but a workers script like below could work with some modification and more user agent checks:

However, you should know that amp isn’t meant to be used mobile redirection/mobile-only viewing. It’s mainly used to “preload” a website from search result pages, loading it before you click it so your device can go ahead and render the page. More information below: