skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search