问题原文
原帖链接 · cbdeveloper · CC BY-SA 4.0
Those pages are all indexed and rank well, so I want to be extra careful.
This is my current sitemap.xml:
/OLD_FOLDER/some-slug-1
/OLD_FOLDER/some-slug-2
/OLD_FOLDER/some-slug-3
I'm setting up 301 redirects, replacing OLD_FOLDER with NEW_FOLDER.
So, my new sitemap.xml will become:
/NEW_FOLDER/some-slug-1
/NEW_FOLDER/some-slug-2
/NEW_FOLDER/some-slug-3
Here are my worries about doing that:
- What if Googlebot "sees" my new sitemap before it visits any old url? I.e: before it sees any of the
301 redirects?
In this case, Googlebot will discover some "NEW" urls with the NEW_FOLDER and might try to index those before it even sees the 301 redirects on the OLD urls. And I have no idea how it would behave in this scenario. Will Googlebot be "smart" enough to merge all the ranking signals from the OLD urls when later it sees the 301 redirects?
If Googlebot "sees" the 301 redirects from the OLD urls before discovering the NEW urls, then I'm pretty sure everything will be fine.
What is the correct approach on this? Should I set the redirects and wait a couple of months before updating my Sitemap?
已采纳解答
原帖链接 · Stephen Ostermiller · CC BY-SA 4.0
You should update your sitemap with the new URLs immediately. Google uses XML sitemaps as one of the ways to determine which URLs you prefer. When you have old redirecting URLs in your sitemap, it sends mixed messages to Googlebot.
It isn't a problem for Googlebot to crawl the new URLs before it finds the redirects. When Googlebot find new URLs, it does many checks on them before it adds anything to its index. It will check to see if the content on those URLs is published elsewhere. It will realize that it has seen the those pages at other URLs before on your site. Google only indexes one URL when it finds the same content on two or more of your URLs. When Googlebot crawls your new URLs before seeing the redirects, it will need to decide which of the two to index.
It doesn't really matter which of the two Google chooses to index. Part of Google's de-duplication process is merging the reputation of all duplicate pages. Google could:
- Decide to keep the old URLs indexed for a while. They had been in your sitemap and Google hasn't seen that they redirect yet.
- Index the new URLs using the XML sitemap as the signal that this is now your new preferred URL for that content.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
