开发者

301 Redirect appears to be losing referrer information

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 id开发者_Python百科eas beyond the above what might be causing such an issue?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜