我应该使用什么 HTTP 重定向方法?

发布于 2024-10-06 23:12:29 字数 177 浏览 2 评论 0原文

我有一个带有域名的博客。我很快就会购买另一个域名。
我担心的是,当我更改博客域时,其他网站的所有链接都可能被破坏。我希望这些链接永远存在,并且希望它的页面排名不下降。

为了保持页面排名,我应该使用什么重定向?(HTTP 301?302?303?)
我不明白他们有什么区别。

旧域名仍然是我的。

I have a blog with a domain. And I'm buying another domain soon.
What I concerned is, when I change my blog domain, all links could be broken from other sites. I want the links alive forever, and also want it's page-rank not to go down.

For keeping my page-rank, what redirection should I use?(HTTP 301? 302? 303?)
I don't understand what their difference is.

The older domain is still mine.

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

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

发布评论

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

评论(2

止于盛夏 2024-10-13 23:12:29

我想说 HTTP 301(永久移动)重定向是您最好的选择。

它表示永久重定向,这在您的情况下似乎是准确的。它还可以防止您因重复内容而受到任何处罚。

每当向旧 URL 发出请求时,301 重定向都会告诉搜索引擎该页面已移至新位置,并为其提供新的正确 URL。可以将其想象为当您搬到新地址时为您的邮件提出更改地址请求。

编辑:当您将网站移至新地址时,Google 明确建议使用 301 重定向。从网站站长上标题为“移动您的网站”的页面中央(强调):

使用 301 重定向永久
将旧网站上的所有页面重定向到
您的新网站。
这告诉搜索
您的网站拥有的引擎和用户
永久移动。我们建议
您移动并重定向一个部分或
先目录,然后测试make
确保您的重定向有效
在移动所有之前正确地
内容。

不要进行单一重定向
引导所有流量从旧的
站点到您的新主页。这将
避免404错误,但这并不好
用户体验。这是更多的工作,但
页面到页面重定向会有所帮助
保留您网站在 Google 中的排名
同时提供一致且
为您的用户提供透明的体验。

如果不会出现 1:1 的比赛
旧网站和新网站上的页面
网站(推荐),尝试确保
您旧网站上的每个页面都位于
最少重定向到新页面
类似的内容。

第二个粗体文本片段向我表明,如果您使用 301 重定向,您很可能可以保持网站在 Google 搜索结果中的大部分排名。我认为您的排名可能会出现暂时波动,甚至可能,但只要一切都正确调整方向,似乎有证据表明至少不会失去所有希望。正如其中一条评论所指出的,PageRank 的一些波动或损失与从头开始并不是一回事。

Google 还建议您让他们知道您的网站已迁移,这可能值得做——看来我的“地址变更”比喻比我想象的还要准确!

I'd say an HTTP 301 (Moved Permanently) redirect is your best bet.

It indicates a permanent redirect, which appears to be accurate in your case. It also prevents you from being imposed any penalties for duplicate content.

Any time a request is made to your old URL, the 301 redirect tells the search engine that the page has moved to a new location and provides it with the new, correct URL. Think of it like putting in a change of address request for your mail when you've moved to a new address.

EDIT: Google explicitly recommends using a 301 redirect when you've moved your website to a new address. From their page entitled "Moving your site" on Webmaster Central (emphasis added):

Use a 301 Redirect to permanently
redirect all pages on your old site to
your new site.
This tells search
engines and users that your site has
permanently moved. We recommend that
you move and redirect a section or
directory first, and then test to make
sure that your redirects are working
correctly before moving all your
content.

Don't do a single redirect
directing all traffic from your old
site to your new home page. This will
avoid 404 errors, but it's not a good
user experience. It's more work, but a
page-to-page redirect will help
preserve your site's ranking in Google
while providing a consistent and
transparent experience for your users.

If there won't be a 1:1 match between
pages on your old site and your new
site (recommended), try to make sure
that every page on your old site is at
least redirected to a new page with
similar content.

The second snippet of bolded text indicates to me that it's very likely you can maintain most of your site's ranking in Google's search results if you use a 301 redirect. I assume that temporary fluctuations in your rankings are possible, even likely, but as long as everything is redirected properly, there appears to be evidence that at least not all hope is lost. Some fluctuation or loss in PageRank is not the same thing as starting all over from scratch, as one of the comments indicates.

Google also advises letting them know when your site has moved, which may be worth doing—it looks like my "change of address" simile is even more precise than I thought!

一江春梦 2024-10-13 23:12:29

301 是“永久移动”:

http://www.w3.org/Protocols/ rfc2616/rfc2616-sec10.html

在 Google 上随意搜索“301 pagerank”,结果很多人声称 301 是正确的选择。

301 is "Moved Permanently":

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Casually searching for "301 pagerank" on Google results in many people claiming that 301 is the way to go.

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