-2

Currently on my webshop, on the category pages with too many pages, the urls end by https://www.example.com?p=2 p=3... I want to tell to the robots.txt to not index urls ending by p=Number. How do I do this? It's a prestashop website by the way.

Thank you all.

JohnDickinson
  • 97
  • 1
  • 3
  • 11

2 Answers2

0

Just add this line in your robots.txt file:

Disallow: /?p=*

So for example, this would stop URLs like example.com/?p=2 from being indexed by the likes of Google. The * symbol stands for ALL. So anything after p= would be included.

Joe
  • 4,877
  • 5
  • 30
  • 51
0

If p= pagination, you wouldn’t want to disallow those URLs as you’d still want them crawled.

If you don’t want them indexed in Google, add a noindex tag to them but don’t place anything on them to prevent crawling.

SoyLatte
  • 35
  • 7