I run a small e-commerce site that over the last few years has built up a reasonable search engine status.
我经营着一个小型的电子商务网站,在过去的几年里建立了一个合理的搜索引擎状态。
I've been working on a new site that uses new URL formats and I am worried about how to deal with all the broken links and customer frustration for users finding out dated links through search engines.
我一直在研究一个使用新URL格式的新网站,我担心如何处理所有破坏的链接和客户对通过搜索引擎查找过时链接的沮丧情绪。
Can anyone offer advice on how to mitigate / minimize the damage? The old site was done in ASP.NET the new in ASP.NET MVC
任何人都可以提供有关如何减轻/减少损害的建议吗?旧的站点是在ASP.NET MVC中的ASP.NET中完成的
Thanks for any help you can be.
感谢您的帮助。
6 个解决方案
#1
You will need some sort of parallel structure. Ideally, the old site with the old URLs remains fully accessible for some time, but does not get indexed any more. If that's not feasible, and since you are saying that the site is small, you could establish a URL mapping old-new and have a 404 handler that attempts to redirect to the new content.
您将需要某种并行结构。理想情况下,具有旧URL的旧站点在一段时间内仍然可以完全访问,但不会再被编入索引。如果这不可行,并且因为您说网站很小,您可以建立一个旧的URL映射,并有一个404处理程序,尝试重定向到新内容。
#2
You should create permanent redirects for the links you want to preserve (routelevel). This way searchengines will update their references to the new locations.
您应该为要保留的链接(routelevel)创建永久重定向。这样searchengines将更新他们对新位置的引用。
#3
As cdonner says, you want to have a handler that reroutes the traffic to its appropriate destination. Even more important though, is you want to make sure when you redirect the client, you send a status code of 301 (permanently moved) instead of 404. The search engines will rate you negatively if there are a lot of 404 errors on your site and you will see your standing decrease instead of increase.
正如cdonner所说,你想要一个处理程序,将流量重新路由到其适当的目的地。更重要的是,您要确保在重定向客户端时,您发送的状态代码为301(永久移动)而不是404.如果您的网站上存在大量404错误,搜索引擎会对您产生负面评价你会看到你的站立减少而不是增加。
#4
You could set up your old site's .htaccess file to redirect traffic to the new site. Beyond that, you could use mod_rewrite to map requests to pages on the old site to the same (or similar) pages on the new one.
您可以设置旧网站的.htaccess文件,以将流量重定向到新网站。除此之外,您可以使用mod_rewrite将对旧网站上的页面的请求映射到新网站上的相同(或类似)页面。
#5
This is the way I do it migrating from an old ASP classic site:
这是我从旧的ASP经典网站迁移的方式:
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
Dim fullOriginalpath As String = Request.Url.ToString.ToLower
If (fullOriginalpath.Contains("/viewitem.asp?itemid=")) Then
Context.Response.StatusCode = 301
Context.Response.Redirect("/item/" + getItemIDFromPath(fullOriginalpath))
ElseIf (fullOriginalpath.Contains("/search.asp")) Then
Context.Response.StatusCode = 301
Context.Response.Redirect("/search/")
ElseIf (fullOriginalpath.EndsWith("/default.asp")) Then
Context.Response.StatusCode = 301
Context.Response.Redirect("/")
End If
End Sub
#6
Sounds like you have it figured out, but just wanted to add one more option - the canonical tag - which may have advantages if for any reason you needed to keep both the old url and the new URL active. You can create a copy of the page at the old URL and then add the "canonical" tag, which tells the search engines "please credit the link credits of this page to the following page: www.site.com/newpage"
听起来你已经弄明白了,但只是想添加一个选项 - 规范标签 - 如果出于任何原因需要保持旧网址和新网址都有效,这可能会有优势。您可以在旧网址上创建网页副本,然后添加“规范”标记,告知搜索引擎“请将此页面的链接信用额度归功于以下页面:www.site.com/newpage”
<link rel="canonical" href="http://www.yoursite.com" /> this line goes in before </head>
此行在 之前进入
For example if you have lots of links to certain key pages and those links are pointed to the old URL's, this may be a help.
例如,如果您有许多指向某些关键页面的链接,并且这些链接指向旧URL,则可能是一个帮助。
A 301 also redirects the link credits, and generally moved pages you'll want to use a 301 redirect. Oh and if you use a URL rewrite rule and all the URL's change in the same way, you can probably use regex in the rewrite rule to handle all of them in a single step.
301还会重定向链接信用,并且通常会移动您要使用301重定向的页面。哦,如果您使用URL重写规则和所有URL的更改方式相同,您可以在重写规则中使用正则表达式来在一个步骤中处理所有这些。
#1
You will need some sort of parallel structure. Ideally, the old site with the old URLs remains fully accessible for some time, but does not get indexed any more. If that's not feasible, and since you are saying that the site is small, you could establish a URL mapping old-new and have a 404 handler that attempts to redirect to the new content.
您将需要某种并行结构。理想情况下,具有旧URL的旧站点在一段时间内仍然可以完全访问,但不会再被编入索引。如果这不可行,并且因为您说网站很小,您可以建立一个旧的URL映射,并有一个404处理程序,尝试重定向到新内容。
#2
You should create permanent redirects for the links you want to preserve (routelevel). This way searchengines will update their references to the new locations.
您应该为要保留的链接(routelevel)创建永久重定向。这样searchengines将更新他们对新位置的引用。
#3
As cdonner says, you want to have a handler that reroutes the traffic to its appropriate destination. Even more important though, is you want to make sure when you redirect the client, you send a status code of 301 (permanently moved) instead of 404. The search engines will rate you negatively if there are a lot of 404 errors on your site and you will see your standing decrease instead of increase.
正如cdonner所说,你想要一个处理程序,将流量重新路由到其适当的目的地。更重要的是,您要确保在重定向客户端时,您发送的状态代码为301(永久移动)而不是404.如果您的网站上存在大量404错误,搜索引擎会对您产生负面评价你会看到你的站立减少而不是增加。
#4
You could set up your old site's .htaccess file to redirect traffic to the new site. Beyond that, you could use mod_rewrite to map requests to pages on the old site to the same (or similar) pages on the new one.
您可以设置旧网站的.htaccess文件,以将流量重定向到新网站。除此之外,您可以使用mod_rewrite将对旧网站上的页面的请求映射到新网站上的相同(或类似)页面。
#5
This is the way I do it migrating from an old ASP classic site:
这是我从旧的ASP经典网站迁移的方式:
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
Dim fullOriginalpath As String = Request.Url.ToString.ToLower
If (fullOriginalpath.Contains("/viewitem.asp?itemid=")) Then
Context.Response.StatusCode = 301
Context.Response.Redirect("/item/" + getItemIDFromPath(fullOriginalpath))
ElseIf (fullOriginalpath.Contains("/search.asp")) Then
Context.Response.StatusCode = 301
Context.Response.Redirect("/search/")
ElseIf (fullOriginalpath.EndsWith("/default.asp")) Then
Context.Response.StatusCode = 301
Context.Response.Redirect("/")
End If
End Sub
#6
Sounds like you have it figured out, but just wanted to add one more option - the canonical tag - which may have advantages if for any reason you needed to keep both the old url and the new URL active. You can create a copy of the page at the old URL and then add the "canonical" tag, which tells the search engines "please credit the link credits of this page to the following page: www.site.com/newpage"
听起来你已经弄明白了,但只是想添加一个选项 - 规范标签 - 如果出于任何原因需要保持旧网址和新网址都有效,这可能会有优势。您可以在旧网址上创建网页副本,然后添加“规范”标记,告知搜索引擎“请将此页面的链接信用额度归功于以下页面:www.site.com/newpage”
<link rel="canonical" href="http://www.yoursite.com" /> this line goes in before </head>
此行在 之前进入
For example if you have lots of links to certain key pages and those links are pointed to the old URL's, this may be a help.
例如,如果您有许多指向某些关键页面的链接,并且这些链接指向旧URL,则可能是一个帮助。
A 301 also redirects the link credits, and generally moved pages you'll want to use a 301 redirect. Oh and if you use a URL rewrite rule and all the URL's change in the same way, you can probably use regex in the rewrite rule to handle all of them in a single step.
301还会重定向链接信用,并且通常会移动您要使用301重定向的页面。哦,如果您使用URL重写规则和所有URL的更改方式相同,您可以在重写规则中使用正则表达式来在一个步骤中处理所有这些。