开发者

how can i stop google indexing pages with urls ending with date and time

开发者 https://www.devze.com 2023-02-13 04:07 出处:网络
I have a website with some pages like www.xyz.com/product1 www.xyz.com/product2开发者_开发知识库

I have a website with some pages like

and www.xyz.com/product1/date which can be dynamic as what user searches.

Current google is indexing

  • www.xyz.com/product1
  • www.xyz.com/product2
  • www.xyz.com/product1/date

I dont want google to index www.xyz.com/product1/date urls....


Maybe writing a proper robots meta tag:

  • HTML spec


You might be able to do what you want with a robots.txt at your website root directory

User-agent: *
Disallow: /product1/*


If the date was in the query part ie www.example.com/product1?date=yyyy-mm-dd you can tell Google to ignore the date argument via Google Webmaster Tools.

Could you make the trade off and move date to query part of URL?

0

精彩评论

暂无评论...
验证码 换一张
取 消