简体   繁体   English

如何删除303重定向的Google搜索结果?

[英]How to remove google search results for 303 redirect?

I run a dynamic site that may or may not redirect a certain route based on user preferences. 我运行一个动态站点,该站点可能会也可能不会根据用户首选项重定向某些路由。

Let's say it's http://clientname.example.com/maybe . 假设它是http://clientname.example.com/maybe Our backend has a response for /maybe , but if the client decides they would rather use their site for the information on that page, we instead use a 303 Redirect to their page on a separate domain. 我们的后端有一个对/maybe的响应,但是如果客户决定他们宁愿使用其站点来​​获取该页面上的信息,我们可以使用303重定向到其在单独域上的页面。

All of our content pages use the <meta name="robots" content="noindex"> tag, so google will not index any of our pages. 我们所有的内容页面均使用<meta name="robots" content="noindex">标记,因此Google不会为我们的任何页面编制索引。 HOWEVER, when I search google for "site:our_domain_name.com", I get a bunch of results that all trace back to those dynamic routes that return a 303. When I click on the search results in google, the 303 is followed as expected and I arrive at the client's site. 但是,当我在Google上搜索“ site:our_domain_name.com”时,会得到一堆结果,这些结果都可以追溯到返回303的那些动态路由。当我单击google中的搜索结果时,303就会按照预期进行我到达了客户的站点。 What I want, is for my piece of the puzzle to not show in results at all. 我想要的是,我的难题完全不显示在结果中。

I was troubleshooting it this morning, and I realized that our noindex meta tag was obviously not being seen by the robot as it was following the redirect, so I added a rule on the server that adds the ' X-Robot-Tag: noindex ' header to redirect responses. 我今天早上正在对其进行故障排除,我意识到机器人在重定向后显然看不到我们的noindex元标记,因此我在服务器上添加了一个规则,添加了“ X-Robot-Tag: noindex ”标头以重定向响应。

Is that enough? 够了吗? If I wait long enough, will those search results be removed? 如果我等待足够长的时间,这些搜索结果会被删除吗?

Is that enough? If I wait long enough, will those search results be removed?

No because if an external page links to your site, Google will follow the link to your site, then your 303 (if your return such a code) and won't see the noindex . 否,因为如果外部页面链接到您的网站,则Google会跟踪该链接到您的网站,那么您的303(如果您返回了这样的代码)将不会看到noindex

Don't return a 303 for Google bots and you should be fine. 不要为Google机器人返回303,这应该没问题。 It may take a bit of time, because Google needs to reprocess the page and see the noindex to remove it. 可能需要一些时间,因为Google需要重新处理该页面并查看noindex才能将其删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM