Mobile app version of vmapp.org
Login or Join
Deb1703797

: Prevent Google from indexing and caching pages with query strings I have a WordPress site is running on my domain. There are some pages that are indexed and cached by Google with query string

@Deb1703797

Posted in: #301Redirect #QueryString #Wordpress

I have a WordPress site is running on my domain. There are some pages that are indexed and cached by Google with query string like this: example.com/category/xxx/?post_type=product.

I want Google to index that page, but without the query string. How can I make Google cache example.com/category/xxx (without the query string post_type). I want Google to stop indexing any pages on the site that have a query string. None of the query strings on my site actually change the content of the pages.

Should I redirect to remove the query string? How would I do that?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Deb1703797

3 Comments

Sorted by latest first Latest Oldest Best

 

@Murray432

You can instruct Google how to treat urls with parameters, they have a tool for that in Google Search Console.

They are passive parameters if they do not change content on a page.

If you categorize the parameter and add a rel canonical tag for the non paramatized url, then the non parametized url is what should appear in the search results.
support.google.com/webmasters/answer/6080550?hl=en

10% popularity Vote Up Vote Down


 

@Heady270

There are several solutions. The easiest would be to put canonical URLs in your pages. That lets Google know which URL is the correct one that should be indexed. There are several plugins like Yoast for WordPress that will do that for you.

Another solution would be to disallow Google from crawling URLs with query strings. You could do so by creating a robots.txt file like:

User-Agent: *
Disallow: /*?


You could also put in redirects, but implementing them is a bit harder than other solutions.

10% popularity Vote Up Vote Down


 

@Barnes591

I think you mean how Google crawls.

Google crawls based on website configuration. Meaning if your final display URL would be with parameters then it will crawl accordingly.

If you want clean URL then change the settings in WordPress.

Path: WordPress Admin >> Settings >> Permalinks and choose the format you wish to keep.

If your question is different then you may need to explain slightly more in detail.

Hope this helps.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme