-1

I want to redirect my mobile site users to mobile specific pages in case the request has been originated from mobile device. I can write below code near HTML Head tag in JS to figure out this.

if(Check UserAgent is Mobile)
{
    mobile=true;
    window.location.assign("http://abc.com"+"&mobile="+mobile);

}

If mobile parameter is available in HTTP params then I can implement certain logic.

Will it cause any issue w.r.t. SEO?

Thanks!

4

1 回答 1

1

一旦替代 URL 传播开来,搜索引擎会将您的移动页面视为重复内容(除非搜索引擎确实检查了移动重定向,在这种情况下,它会更早地认为它是重复的)。

考虑响应式设计而不是 UA 嗅探。如果您无法这样做,请阅读rel=canonical并将其应用于您的移动页面。

于 2013-09-08T20:23:09.893 回答