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.
2
Answers
Just add this line in your
robots.txt
file: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 afterp=
would be included.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.