0

How do you create a HTTP 302 in order to redirect mobile users to a different URL: example.com to m.example.com ?

Google recommends HTTP 302 for redirecting mobile users:

"HTTP redirection is commonly used to redirect clients to device-specific URLs. (...) It does not matter if the server redirects with an HTTP 301 or a 302 status code, but use of 302 is recommended whenever possible."

As a better technique than JavaScript redirect:

"Be aware of the latency caused by the client side of redirection due to the need to first download the page, then parse and execute the JavaScript before triggering the redirect."

https://developers.google.com/search/mobile-sites/mobile-seo/separate-urls

2
  • 1
    you need to do it on the server, which server are you talking about? Commented Mar 31, 2018 at 11:56
  • Sure @david.lucky Can you make the question more specific so I know what answer to provide?
    – Michelle
    Commented Mar 31, 2018 at 14:27

0

Browse other questions tagged or ask your own question.