大网数据广告活动
网站运营与故障问答

How to stop google from indexing old URLs of a website which redirects to new URLs

· 52CE 我爱测

My old WordPress configuration added index.php to the permalinks of all my pages. e.g: https://example.com/index.php/contact etc., It was indexed already by google crawler. Now I reconfigured WordPress to make the URLs to look li…

问题原文

原帖链接 · Rajesh Pachaikani · CC BY-SA 4.0

My old WordPress configuration added index.php to the permalinks of all my pages. e.g: https://example.com/index.php/contact etc.,

It was indexed already by google crawler. Now I reconfigured WordPress to make the URLs to look like https://example.com/contact

But google search still has the results showing https://example.com/index.php/contact. All old URLs are redirecting to corresponding new pages. But I don't want to display index.php in google search results.

How to remove indexed URLs with index.php and to display the new URLs?

已采纳解答

原帖链接 · Stephen Ostermiller · CC BY-SA 4.0

First check that your URLs give "301 Permanent" redirects. If you are redirecting using "302 Temporary", "Meta Refresh", or JavaScript, it will take longer.

All you have to do is wait. Google automatically stops indexing redirecting URLs and indexes the pages they point to. For your most popular pages, it should happen within a few weeks. If you have thousands of pages, it could take months until every single last one of them is changed in the Google index.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2019-07-19)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。