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
Post a Comment