301 重定向似乎正在丢失引荐来源网址信息

发布于 2024-12-01 10:59:39 字数 688 浏览 0 评论 0原文

我们刚刚上线了一个新网站,我进行了不同的 URL 重写来处理旧的索引页面,执行 301 重定向到新网站上新的等效页面位置。

我们注意到,自新网站上线之日起,Google Analytics 中的统计数据总体上大幅下降 :(

我们的一位 SEO 人员指出,当您单击 google 中的旧索引页面之一时,它会正确地显示301 到新位置,但是,如果您查看 __utmz Google Analytics cookie,它会显示“direct”,而他认为应该是'有机'。 他认为引荐来源网址信息在 301 重定向期间丢失,因此,这被视为直接流量而不是有机流量?

新网站是一个 ASP.NET 4.0 Web 窗体应用程序,并为新 URL 使用路由。我正在 Application_BeginRequest 例程中的 global.asax 中为旧页面生成新的路由/url。

如果请求需要 301,则执行的代码如下:

Response.Clear();
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", newUrl);
Response.End();

这里是否有任何内容可以表明问题可能是什么,或者除上述之外的任何想法可能导致此类问题?

We've just put a new website live and I have varying Url re-writing in place to handle the old indexed pages, performing a 301 redirect to the new equivalent page location on the new site.

We've noticed since the day the new site went live that in Google Analytics, the stats in general have plummeted substantially :(

One of our SEO guys has pointed out that when you click on one of the old indexed pages in google, it correctly 301's to the new location, however, if you view the __utmz Google Analytics cookie, it has 'direct' in it, whereas he believes that should be 'organic'.
He thinks that the referrer information is being lost during the 301 redirect, and as a result, this is being treated as direct traffic instead of organic?

The new website is an ASP.NET 4.0 Web Forms application and is using Routing for the new Url's. I am generating the new route/url for old pages within the global.asax within the Application_BeginRequest routine.

If a 301 is needed for the request, this is the code that is executed:

Response.Clear();
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", newUrl);
Response.End();

Is there anything here that would indicate what the problem might be, or any ideas beyond the above what might be causing such an issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乖不如嘢 2024-12-08 10:59:39

我找到了问题所在 - 我的部分出现了一个愚蠢的错误,其中包含我们的谷歌分析标签附带的文件的相对网址,在网站的某些位置工作,但在其他位置,包含返回 404!我的不好。

I located the problem - a silly error on my part with a relative url to a file that accompanies our google analytics tag, working in some locations of the website, but in others, the include was returning a 404! My bad.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文