: How to hide product prices from search engines when they vary by country? We have a site which sells items online only for US customers. The site checks the location based on IP and decides
We have a site which sells items online only for US customers. The site checks the location based on IP and decides if the price should appear on not. Customers from other locations can buy the products offline (for a different price). Searching Google for " price" shows the price in the US in the result's description. On the webpage the user will not see that price if he's not in the US.
How can I prevent Google from showing the prices?
I thought about using javascript or checking for bots and hiding the price from them. Is there a simpler solution? Which option is best?
More posts by @Ann8826881
2 Comments
Sorted by latest first Latest Oldest Best
What I finally did was to always block the price to bots.
Used a code similar to this:
function _bot_detected() {
if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT'])) {
return TRUE;
}
else {
return FALSE;
}
}
More info at: stackoverflow.com/questions/677419/how-to-detect-search-engine-bots-with-php
There are two ways you could handle it - unfortunately both are not ideal solutions...
You could remove the microformats markup from your pages - but this will affect the people both in the US and outside looking at your results
You could create different versions of your website for different countries to be indexed in results for these countries. This will take a lot of work and set up and also you will need to wait for Google to change their results (and in the end they still decide what they show)
It looks like there is no easy answer here and your users might just have to be content with seeing different prices in search results and getting different prices when buying from resellers.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.