从Google动态网址中删除网页-robots.txt [英] remove pages from google dynamic url - robots.txt

查看:111
本文介绍了从Google动态网址中删除网页-robots.txt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Google上有一些链接为 domain.com/results.php?name=a&address=b

I have a few links on google that are domain.com/results.php?name=a&address=b

结果页面/参数现已重命名,我需要删除google等上的现有链接.

The results page/parameters has now been renamed and I need to remove the existing links on google etc.

我尝试了

用户代理:* 禁止:/results.php

User-agent: * Disallow: /results.php

在robots.txt中,然后在Google网站管理员上添加了要删除的网址:

in robots.txt and then on google webmaster added the url to be removed:

domain.com/results.php

它说它已被成功删除,但是当我在google上看到类型为domain.com的Google-带有参数的现有url仍然存在.

it says it was removed successfully, however when I look at google an type domain.com - the existing urls with parameters are all still there.

我做错了什么?有很多链接,所以我需要一种方法来一次处理所有这些链接,而不是一个一个地处理.

What am I doing wrong? There are quite a few links so I need a way to deal with all of them at once instead of one by one.

谢谢

推荐答案

您可以在results.php上放置一个页面,然后获取它以返回301重定向返回您的主页.

You could put a page at results.php, and just get it to return a 301 redirect back your home page.

<?php 
header("HTTP/1.1 301 Moved Permanently"); 
header("Location: http://www.Your-Website.com"); 
?>

随着Google爬行您的网站,旧页面将消失.您可能会发现这比删除旧页面更快.

As Google recrawls your site, the old pages will disappear. You may find this works faster than just having removed the old page.

这篇关于从Google动态网址中删除网页-robots.txt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆