: Blocking every URL with "?" in it Will below Disallow function will block every URL which has "?" in it? Disallow: /*?*PrintPage=yes* I was actually checking few pages with "?" in them and
Will below Disallow function will block every URL which has "?" in it?
Disallow: /*?*PrintPage=yes*
I was actually checking few pages with "?" in them and they were not indexed in Google and then I saw some other URLs with "?" and they are indexed in Google.
Why is this happening, also these "?" pages don't have noindex tag or canonical tag.
More posts by @Martha676
2 Comments
Sorted by latest first Latest Oldest Best
If you want to block pages with parameters the best way to do it is with Google search console under Crawl > URL Parameters. This will remove the pages pretty quickly and will likely improve your overall rankings.
No, it does not block all webpages that have ? in URL.
Disallow: /*?*PrintPage=yes*
This will block below kind of pages for example.
example.com/sometext?xPrintPage=yes.html www.example.com/123?PrintPage=yes.php example.com/Some-123?xyz-PrintPage=yes/another-page/
Did you notice anything? That rule will block only those pages that contain ? and PrintPage=yes, In that rule, you can add any characters before and after ? . Same thing will apply to *PrintPage=yes* as well.
To block every webpage that have ? in URL, you have to use * in both front and end side like this
Disallow: /*?*
I strongly recommended you to checkout this Google reference about robots.txt.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.