【问题标题】:Redirects & Google Indexing重定向和谷歌索引
【发布时间】:2012-10-02 18:17:33
【问题描述】:

我在这里为客户设计了一个网站:http://www.haniabyanyacole.com

我正在使用元 http-equiv="refresh" 将用户从启动页面重定向到 haniabyanyacole.com/site/(我知道不建议这样做),我认为这会导致 Google 返回第一个搜索公司名称的结果是http://haniabyanyacole.com/site,而不是根目录。

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

【问题讨论】:

    标签: redirect indexing


    【解决方案1】:

    您可以尝试使用 javascript 为您执行重定向,而不是使用 META HTTP-EQUIV(谷歌等同于重定向响应标头),但有延迟。可能是这样的:

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

    在您的页眉中,然后在正文标签中添加:

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

    所以它看起来像:

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

    这将在 10 秒后重定向到 http://haniabyanyacole.com/site。

    【讨论】:

    • 谢谢乔恩,我会试试你的方法,让你知道它是如何工作的。
    • 我试过这个方法,大概一周了,搜索结果还是/site/。还有其他可行的方法吗?
    猜你喜欢
    • 2015-04-21
    • 1970-01-01
    • 2011-04-07
    • 2016-07-11
    • 1970-01-01
    • 1970-01-01
    • 2014-03-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多