重定向&谷歌索引 [英] Redirects & Google Indexing

查看:120
本文介绍了重定向&谷歌索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我为客户设计的网站: http://www.haniabyanyacole.com

I have a website I've designed for a client here: http://www.haniabyanyacole.com

我正在使用meta http-equiv =refresh将用户从启动页面重定向到haniabyanyacole.com/site/(我知道不推荐)我认为这会导致Google使用 http://haniabyanyacole.com/site而不是根目录。

I'm using a meta http-equiv="refresh" to redirect the user from the splash page to haniabyanyacole.com/site/ (I know that's not recommended) and I think this is causing Google to return the first search result for the company's name with http://haniabyanyacole.com/site instead of the root directory.

是否有重定向解决方案(301,302?)会强制Google将索引编入索引而不是/ site /?仅供参考我将网站地图上传到Google网站站长工具,其中包括haniabyanyacole.com /

Is there a redirect solution (301, 302?) that will force Google to index the root instead of /site/? FYI I have uploaded a sitemap to Google Webmaster Tools that includes haniabyanyacole.com/

推荐答案

而不是使用META HTTP-EQUIV,谷歌相当于一个重定向响应标题,你可以尝试使用javascript为你做一个延迟的重定向。可能类似于:

Instead of using a META HTTP-EQUIV, which google equates to a redirect response header, you can try using javascript to do the redirect for you, on a delay. Maybe something like:

<script type="text/javascript">
<!--
function redirect_to_site(){
    window.location = "http://haniabyanyacole.com/site"
}
//-->
</script>

在您的页面标题中,然后在正文标记中添加:

in your page header, then in the body tag add:

onLoad="setTimeout('redirect_to_site()', 10000)"

所以它看起来像:

<body onLoad="setTimeout('redirect_to_site()', 10000)" >

这将重定向到 http://haniabyanyacole.com/site

这篇关于重定向&amp;谷歌索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆