Sometimes we need to prevent our testing.dev site from showing up in search results on Google, Bing and other search engines until we are ready to launch. We can do this by addting "X-Robots-Tag" paramet to header of the response.
Create filter or you can write the below line in your servlet (you need to write this line of code where your request goes first)
httpResponse.setHeader("X-Robots-Tag", "noindex, nofollow");
and build your project then deploy.
Now you cant test whether you site is showing up in search result Google, Bing and other search engines from the below link:
http://ismysiteindexed.com/
Hope this will help you:)
0 Comment(s)