Disallow query string and specific URL [SEO]

Don’t change robots.txt settings, If you don’t know how robots.txt works. Otherwise you may lost index from Google.

To nofollow query string pages from indexing, we can modify robots.txt file in following way –

User-agent: *
Disallow: /*?*

We can also specify specific query string only for ‘rtcl_category‘ and ‘rtcl_location‘ in following way –

Disallow: /*?rtcl_category=*&rtcl_location=*

To disallow specific portion of URL, specially filter generated URL for Classified Listing plugin. we can follow below structure –

Disallow: /all-ads/rtcl-category/
Disallow: /all-ads/rtcl-location/
Disallow: /all-ads/tag/

Note: Please, check your URL structure before add it to robots.txt. We followed default permalink structure.