javascript - Redirect to mobile site based on user agent - what is impact on SEO? -


i want redirect mobile site users mobile specific pages in case request has been originated mobile device. can write below code near html head tag in js figure out this.

if(check useragent mobile) {     mobile=true;     window.location.assign("http://abc.com"+"&mobile="+mobile);  } 

if mobile parameter available in http params can implement logic.

will cause issue w.r.t. seo?

thanks!

search engines consider mobile page(s) duplicate content once alternative urls spread (unless search engines check mobile redirects, in case it'll consider duplciate earlier).

consider responsive design instead of ua sniffing. if you're unable so, read rel=canonical , apply mobile pages.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -